Sports Aggregator is a comprehensive platform designed to connect sports enthusiasts by providing tools for event organization, venue booking, team management, and a sporting community feed. This repository contains the FastAPI-based backend service that powers the Sports Aggregator platform.
- Mobile Application: Sports_Aggregator_MobileApp_Flet
- Framework: FastAPI
- Python Version: 3.11.4
- Database: PostgreSQL
- Containerization: Docker & Docker Compose
- Web Server: Nginx
- Dependency Management: Pipenv
- Sports Categories Management: Organize events and venues by sport type
- Event System: Create, join and manage sporting events
- Venue Booking: Find and book sports facilities with available time slots
- Team Management: Create teams, manage membership and track statistics
- User Profiles: Handle user registration, authentication and profiles
- Interactive Feed: Community engagement with likes and views tracking
- Booking Services: Comprehensive system for venue reservations
- base.py: Database connection setup and session management
- models.py: SQLAlchemy ORM models defining the database schema
- main.py: Application entry point with route registration
- routes/: API endpoints organized by resource
- docker-compose.yml: Multi-container Docker setup
- nginx.conf: Reverse proxy configuration
- other: other files and folders
The application uses a PostgreSQL database with the following key entities:
- SportCategory: Different types of sports
- User: User account information
- Event: Sporting events with registrations
- Venue: Sports facilities with booking capabilities
- Team: Groups of users participating in events
- FeedItem: Community content and interactions
- Python 3.11.4
- Docker and Docker Compose
- Pipenv
-
Clone the repository:
git clone https://github.com/Ambassador-of-programming/Sports_Aggregator_FastAPI.git cd Sports_Aggregator_FastAPI
-
Set up the virtual environment:
pipenv install pipenv shell
-
Start the application with Docker Compose:
docker-compose up -d
-
The API will be available at http://localhost:8000 and through Nginx at http://localhost:80
The application uses the following environment variables:
POSTGRES_USER
: Database usernamePOSTGRES_PASSWORD
: Database passwordPOSTGRES_DB
: Database namePOSTGRES_HOST
: Database hostPOSTGRES_PORT
: Database port
Once the application is running, you can access:
- Interactive API documentation: http://localhost:8000/docs
- Alternative documentation: http://localhost:8000/redoc
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request