Full-stack web application built with FastAPI backend and Next.js frontend.
- FastAPI - Python web framework
- PostgreSQL - Primary database
- Redis - Caching and session storage
- SQLAlchemy - ORM
- Alembic - Database migrations
- JWT - Authentication
- Transformers/Torch - AI/ML capabilities
- Next.js 15 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Axios - HTTP client
- Lucide React - Icons
- Docker - Containerization
- Docker Compose - Multi-service orchestration
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.10+ (for local development)
- Clone the repository
git clone <repository-url>
cd tlaqktek- Start all services
docker-compose up -d- Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Navigate to backend directory
cd backend- Install dependencies using uv
pip install uv
uv sync- Set up environment variables
cp .env.example .env
# Edit .env with your configuration- Run database migrations
uv run alembic upgrade head- Start the development server
uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000- Navigate to frontend directory
cd frontend- Install dependencies
npm install- Create environment file
# Create frontend/.env.local file
cd frontend
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local- Start the development server
npm run devDATABASE_URL=postgresql://postgres:password@localhost:5432/fastapi_db
REDIS_URL=redis://localhost:6379/0
SECRET_KEY=your-secret-key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
NEXT_PUBLIC_API_URL=http://localhost:8000
Create new migration:
cd backend
uv run alembic revision --autogenerate -m "description"Apply migrations:
uv run alembic upgrade headWhen the backend is running, API documentation is available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
tlaqktek/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── core/ # Core functionality
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utilities
│ ├── alembic/ # Database migrations
│ ├── main.py # Application entry point
│ └── pyproject.toml # Python dependencies
├── frontend/ # Next.js frontend
│ ├── src/ # Source code
│ ├── components/ # React components
│ ├── public/ # Static assets
│ └── package.json # Node dependencies
└── docker-compose.yml # Docker services
# Run tests
uv run pytest
# Format code
uv run black .
uv run isort .
# Type checking
uv run mypy .
# Start development server
uv run uvicorn main:app --reload# Development server
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Lint code
npm run lint- web: FastAPI backend (port 8000)
- frontend: Next.js frontend (port 3000)
- db: PostgreSQL database (port 5432)
- redis: Redis cache (port 6379)
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request