Planetarium-API-Service is a web application designed to manage a planetarium, including the creation and administration of shows, sessions, reservations, and tickets. This service provides a REST API for handling information about planetarium domes, astronomy shows, sessions, and ticket reservations. The system is built with a focus on ease of use for both users and administrators, as well as robust data validation.
- Allows the creation and editing of planetarium dome details, including the number of rows and seats per row.
- Add, edit, and delete astronomy shows with options to upload images and assign themes to each show.
- Organize and manage show sessions linked to specific planetariums, including selecting the date and time for each session.
- Users can book tickets for selected sessions, with the system ensuring seat availability and validating ticket information.
- For each session, the occupied seats are displayed, helping users choose available seats.
- Supports JWT-based authentication for secure access to the API. Administrators have extended privileges to manage the entire system.
- Built-in API documentation generated with drf_spectacular provides convenient access to descriptions of available endpoints.
- Secure login system to ensure only authorized personnel can create, update, or delete maintenance tasks.
Python3 must be already installed
- git clone https://github.com/romanshupak/Planetarium-API-Service.git
- cd Planetarium-API-Service
- python -m venv venv
- venv\Scripts\activate (on Windows)
- source venv/bin/activate (on macOS)
- pip install -r requirements.txt
- python manage.py migrate
- python manage.py runserver
To configure the application, you need to set up the following environment variables in your .env file:
- POSTGRES_PASSWORD: The password for your PostgreSQL database.
- POSTGRES_USER: The username for your PostgreSQL database.
- POSTGRES_DB: The name of your PostgreSQL database.
- POSTGRES_HOST: The host address for your PostgreSQL database (e.g., localhost or the address of your PostgreSQL server).
- POSTGRES_PORT: The port number on which your PostgreSQL database is running.
- PGDATA: The directory where PostgreSQL will store its data files (e.g., root).
- DJANGO_SECRET_KEY: The secret key used by Django for security purposes. This should be a long, random string.
Make sure to replace the placeholder values with your actual configuration settings before running the application.
Docker should be installed
- docker-compose build
- docker-compose up
- create user via /api/uer/register/
- get access token via /api/user/token/
To get started with Maintenance Manager, follow these steps:
- Clone the repository from GitHub.
- Install the necessary dependencies.
- Set up the database with the required schemas.
- Run the application and log in to access the full range of features.
For demonstration purposes, you can use the following token credentials:
- Email: [email protected]
- Password: test12345
In Docker
- Email: [email protected]
- Password: docker12345