Files
folkugat-web/AGENTS.md

1.1 KiB

Development Commands

Build/Lint/Test

  • Run development server: JWT_SECRET=12345 uvicorn folkugat_web.main:app --reload --reload-include "*.html" --host 0.0.0.0
  • Build for production: ./build.sh

Code Style Guidelines

Python

  • Type hints: Use strict typing with from typing import and custom types from folkugat_web.typing
  • Imports: Standard library first, third-party, then local imports. Use absolute imports for local modules.
  • Naming: snake_case for variables/functions, PascalCase for classes, UPPER_CASE for constants
  • Error handling: Use Result[ResultT, ErrorT] pattern from utils for service functions
  • Async: Use async/await for I/O operations, FastAPI endpoints are async

Frontend

  • CSS: Use Tailwind CSS classes with custom brown/beige theme
  • Templates: Jinja2 templates in folkugat_web/assets/templates/
  • Static files: Organized in folkugat_web/assets/static/

Architecture

  • Structure: api/routes/, config/, dal/, fragments/, model/, services/
  • Database: SQLite with custom DAL layer in dal/sql/
  • Authentication: JWT-based with cookie storage