Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.51 KB

File metadata and controls

33 lines (27 loc) · 1.51 KB

Nedia - Media Asset Management System

Commands

Backend (Python/FastAPI)

  • Run dev server: cd backend && uvicorn app.main:app --reload --port 8000
  • Format code: black app/ && isort app/
  • Type check: mypy app/
  • Run tests: pytest (when tests exist)
  • Run single test: pytest tests/test_file.py::test_function

Frontend (Next.js/TypeScript)

  • Run dev server: cd frontend && npm run dev
  • Build: npm run build
  • Lint: npm run lint
  • Type check: npx tsc --noEmit

Code Style

Python Backend

  • Formatting: Black (line length default), isort with black profile
  • Architecture: DDD/Clean Architecture - domain entities, application services, infrastructure adapters
  • Imports: Group stdlib, third-party, local (from app.domain..., from app.application...)
  • Types: Type hints required (mypy strict mode), use Optional[T], List[T], Dict[K,V] or | None, list[T]
  • Naming: snake_case functions/vars, PascalCase classes, UPPER_CASE constants
  • Error handling: Raise domain exceptions, handle in API layer with proper HTTP codes
  • Async: Use async/await for I/O operations, FastAPI dependencies with Depends()

Frontend (Next.js/TypeScript)

  • Framework: Next.js 16 with App Router, React 19, TypeScript 5
  • Styling: Tailwind CSS v4, shadcn/ui components, lucide-react icons
  • State: Zustand for global state, TanStack Query for server state
  • Components: Functional components, hooks pattern, Radix UI primitives