This is a restful API built to provide endpoints to manage the workflow of a railroad station.
- Clone the repository
git clone https://github.com/sashabryl/train-station-api-service.git
- Go to the project directory
cd train-station-api-service
- Create a virtual environment
python -m venv venv
- Activate the virtual environment
- on Windows:
.\venv\Scripts\activate
- on Linux/MacOS:
- source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Create a copy of the .env.sample file and name it .env. Update the values as needed.
cp .env.sample .env
- Build and run the docker container in detached mode.
docker-compose build
docker-compose up -d
- Find out the id of container containing the app:
docker ps
- Create an admin user
docker exec -it <container_id> python manage.py createsuperuser
- You can visit the admin page at
http://127.0.0.1:8000/admin/
- Or go to the main page at
http://127.0.0.1:8000/api/train-station/
- To learn about all the endpoints, see the documentation
http://127.0.0.1:8000/api/schema/swagger/
- JWT Authentication
- Managing orders and tickets
- Adding other stations
- Routes management
- Journeys management
- Trains management
- Staff management
- Diverse filtering of routes, stations, crews, journeys
- To run the tests, use the following command:
python manage.py test