Skip to content

byeolki/tlaqktek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

심밧다 - TLAQKTEK

Full-stack web application built with FastAPI backend and Next.js frontend.

Tech Stack

Backend

  • FastAPI - Python web framework
  • PostgreSQL - Primary database
  • Redis - Caching and session storage
  • SQLAlchemy - ORM
  • Alembic - Database migrations
  • JWT - Authentication
  • Transformers/Torch - AI/ML capabilities

Frontend

  • Next.js 15 - React framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Axios - HTTP client
  • Lucide React - Icons

Infrastructure

  • Docker - Containerization
  • Docker Compose - Multi-service orchestration

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.10+ (for local development)

Quick Start

Using Docker (Recommended)

  1. Clone the repository
git clone <repository-url>
cd tlaqktek
  1. Start all services
docker-compose up -d
  1. Access the application

Local Development

Backend Setup

  1. Navigate to backend directory
cd backend
  1. Install dependencies using uv
pip install uv
uv sync
  1. Set up environment variables
cp .env.example .env
# Edit .env with your configuration
  1. Run database migrations
uv run alembic upgrade head
  1. Start the development server
uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

  1. Navigate to frontend directory
cd frontend
  1. Install dependencies
npm install
  1. Create environment file
# Create frontend/.env.local file
cd frontend
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local
  1. Start the development server
npm run dev

Environment Variables

Backend (backend/.env)

DATABASE_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

Frontend (frontend/.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000

Database

Migrations

Create new migration:

cd backend
uv run alembic revision --autogenerate -m "description"

Apply migrations:

uv run alembic upgrade head

API Documentation

When the backend is running, API documentation is available at:

Project Structure

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

Development Commands

Backend

# 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

Frontend

# Development server
npm run dev

# Build for production
npm run build

# Start production server
npm run start

# Lint code
npm run lint

Docker Services

  • web: FastAPI backend (port 8000)
  • frontend: Next.js frontend (port 3000)
  • db: PostgreSQL database (port 5432)
  • redis: Redis cache (port 6379)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

About

번개장터, 중고나라에서 한번에 검색으로 나를 위한 매물 찾기

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published