{"id":27349384,"url":"https://github.com/guduchango/fastapi-booking","last_synced_at":"2026-05-19T14:31:26.306Z","repository":{"id":287404002,"uuid":"964607563","full_name":"guduchango/fastapi-booking","owner":"guduchango","description":"booking API with FASTAPI framework","archived":false,"fork":false,"pushed_at":"2025-04-12T01:08:37.000Z","size":23846,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T19:16:42.524Z","etag":null,"topics":["fastapi","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guduchango.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T13:40:25.000Z","updated_at":"2025-04-11T14:03:12.000Z","dependencies_parsed_at":"2025-04-11T15:32:37.807Z","dependency_job_id":null,"html_url":"https://github.com/guduchango/fastapi-booking","commit_stats":null,"previous_names":["guduchango/fastapi-booking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guduchango%2Ffastapi-booking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guduchango%2Ffastapi-booking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guduchango%2Ffastapi-booking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guduchango%2Ffastapi-booking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guduchango","download_url":"https://codeload.github.com/guduchango/fastapi-booking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618281,"owners_count":21134202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","python3"],"created_at":"2025-04-12T19:17:09.283Z","updated_at":"2025-10-04T07:25:43.427Z","avatar_url":"https://github.com/guduchango.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reservation System API\n\nA FastAPI-based reservation system with PostgreSQL, Redis, RabbitMQ, and monitoring tools.\n\n## Features\n\n- RESTful API for managing reservations, guests, and units\n- PostgreSQL database with SQLAlchemy ORM\n- Redis for caching and Celery broker\n- RabbitMQ for message queuing\n- Email notifications using Celery tasks\n- Monitoring with Prometheus and Grafana\n- Error tracking with Sentry\n- Distributed tracing with OpenTelemetry\n- Database management with pgAdmin\n- Email testing with Mailhog\n\n## Prerequisites\n\n- Docker and Docker Compose\n- Python 3.12 or higher\n- Git\n\n## Project Structure\n\n```\n.\n├── app/\n│   ├── api/              # API endpoints\n│   ├── crud/             # Database operations\n│   ├── database/         # Database configuration\n│   ├── email/            # Email service and templates\n│   ├── models/           # SQLAlchemy models\n│   ├── schemas/          # Pydantic models\n│   ├── seeds/            # Database seeding\n│   └── worker.py         # Celery worker configuration\n├── prometheus/           # Prometheus configuration\n├── docker-compose.yml    # Docker services configuration\n├── Dockerfile            # Application container\n├── Dockerfile.worker     # Celery worker container\n├── requirements.txt      # Python dependencies\n└── README.md            # This file\n```\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd \u003crepository-name\u003e\n```\n\n2. Set up environment variables:\n```bash\n# Copy the example environment file\ncp .env.example .env\n\n# Edit the .env file with your desired values\n# Make sure to use secure passwords for production use\n```\n\n3. Build and start the services:\n```bash\ndocker-compose up -d\n```\n\nThis will start the following services:\n- FastAPI application (http://localhost:8000)\n- PostgreSQL database (port 5432)\n- pgAdmin (http://localhost:5050)\n- Redis (port 6379)\n- RabbitMQ (http://localhost:15672)\n- Mailhog (http://localhost:8025)\n- Prometheus (http://localhost:9090)\n- Grafana (http://localhost:3000)\n- Sentry (http://localhost:9000)\n- Celery worker\n- Celery Flower (http://localhost:5555)\n\n3. Seed the database with initial data:\n```bash\n# Access the application container\ndocker exec -it reservation-api /bin/bash\n\n# Inside the container, run the seeding script\npython -m app.seeds.seed_data\n\n# Exit the container\nexit\n```\n\n4. Set up the Python environment and install dependencies (for local development):\n```bash\n# Create a virtual environment\npython -m venv env\n\n# Activate the virtual environment\n# On Linux/Mac:\nsource env/bin/activate\n# On Windows:\n# env\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Accessing the Application Container\n\nTo access the application container and run Python commands:\n\n1. Find the container ID:\n```bash\ndocker ps\n```\n\n2. Access the container:\n```bash\ndocker exec -it \u003ccontainer_id\u003e /bin/bash\n```\n\n3. Once inside the container, you can:\n   - Run Python commands:\n     ```bash\n     python\n     ```\n   - Run the application directly:\n     ```bash\n     uvicorn app.main:app --host 0.0.0.0 --port 8000\n     ```\n   - Run the Celery worker:\n     ```bash\n     celery -A app.worker worker --loglevel=info\n     ```\n   - Run database migrations:\n     ```bash\n     python -m alembic upgrade head\n     ```\n   - Run tests:\n     ```bash\n     pytest\n     ```\n\n4. To exit the container:\n```bash\nexit\n```\n\n## API Documentation\n\nOnce the services are running, you can access:\n- Swagger UI: http://localhost:8000/docs\n- ReDoc: http://localhost:8000/redoc\n\n### Endpoints\n\n- `POST /api/v1/guests/` - Create a new guest\n- `GET /api/v1/guests/` - List all guests\n- `POST /api/v1/units/` - Create a new unit\n- `GET /api/v1/units/` - List all units\n- `POST /api/v1/reservations/` - Create a new reservation\n- `GET /api/v1/reservations/` - List all reservations\n- `PUT /api/v1/reservations/{reservation_id}` - Update a reservation\n\n## Monitoring and Management\n\n### Database Management\n- pgAdmin: http://localhost:5050\n  - Email: admin@admin.com\n  - Password: admin\n  - Server: postgres:5432\n  - Database: reservations\n  - Username: admin\n  - Password: admin\n\n### Email Testing\n- Mailhog: http://localhost:8025\n  - SMTP: localhost:1025\n\n### Message Queue\n- RabbitMQ Management: http://localhost:15672\n  - Username: admin\n  - Password: admin\n\n### Task Monitoring\n- Celery Flower: http://localhost:5555\n\n### Metrics and Monitoring\n- Prometheus: http://localhost:9090\n- Grafana: http://localhost:3000\n  - Username: admin\n  - Password: admin\n\n### Error Tracking\n- Sentry: http://localhost:9000\n\n## Development\n\n1. Create a virtual environment:\n```bash\npython -m venv env\nsource env/bin/activate  # On Windows: env\\Scripts\\activate\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n3. Run the application:\n```bash\nuvicorn app.main:app --reload\n```\n\n4. Run the Celery worker:\n```bash\ncelery -A app.worker worker --loglevel=info\n```\n\n## Testing\n\nRun the test suite:\n```bash\npytest\n```\n\n## Environment Variables\n\nThe following environment variables can be configured:\n\n- `DATABASE_URL`: PostgreSQL connection string\n- `CELERY_BROKER_URL`: RabbitMQ connection string\n- `CELERY_RESULT_BACKEND`: Redis connection string\n- `SMTP_HOST`: Mailhog host\n- `SMTP_PORT`: Mailhog port\n- `FROM_EMAIL`: Sender email address\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguduchango%2Ffastapi-booking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguduchango%2Ffastapi-booking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguduchango%2Ffastapi-booking/lists"}