
- Setup project structure and basic FastAPI application - Define database models for users, profiles, matches, and messages - Set up database connection and create Alembic migrations - Implement user authentication and registration endpoints - Create API endpoints for profile management, matches, and messaging - Add filtering and search functionality for tech profiles - Setup environment variable configuration - Create README with project information and setup instructions
TechDating API
A backend API for a dating application focused on tech professionals.
Features
- User authentication and registration
- Profile management with tech-focused details
- Matching system between users
- Messaging between matched users
- Tech stack filtering for finding compatible matches
Tech Stack
- Framework: FastAPI
- Database: SQLite with SQLAlchemy ORM
- Authentication: JWT tokens
- Migrations: Alembic
API Endpoints
The API is organized into the following main sections:
/api/v1/auth
: User registration and authentication/api/v1/users
: User account management/api/v1/profiles
: User profile creation and management/api/v1/matches
: Match requests and responses/api/v1/messages
: Messaging between matched users/health
: Application health check
Getting Started
Prerequisites
- Python 3.8+
- pip
Installation
- Clone the repository
git clone <repository-url>
cd techdatingappbackend
- Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
cp .env.example .env
# Edit .env with your desired configuration
- Run database migrations
alembic upgrade head
- Start the development server
uvicorn main:app --reload
The API will be available at http://localhost:8000. API documentation will be available at http://localhost:8000/docs.
Project Structure
.
├── alembic.ini # Alembic configuration
├── app/ # Application code
│ ├── api/ # API endpoints
│ │ ├── v1/ # API version 1
│ │ │ ├── endpoints/ # API endpoint implementations
│ │ │ └── api.py # API router
│ │ └── deps.py # API dependencies (auth, etc.)
│ ├── core/ # Core application code
│ │ ├── config.py # Configuration settings
│ │ └── security.py # Security utilities
│ ├── crud/ # CRUD operations
│ ├── db/ # Database setup
│ │ └── session.py # Database session management
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas
├── migrations/ # Alembic migrations
│ └── versions/ # Migration scripts
├── main.py # Application entry point
├── requirements.txt # Dependencies
└── .env # Environment variables
Development
Running Tests
pytest
Linting
ruff .
API Documentation
Once the server is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Description
Languages
Python
98.7%
Mako
1.3%