A full-stack web application for managing floorplans, waypoints, and file uploads with a modern React frontend and Python backend.
- Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
- Backend: Python with Litestar framework, PostgreSQL, and Redis
- Reverse Proxy: Caddy server for routing and static file serving
- 🏗️ Project Management: Create and manage projects with user access control
- 📐 Floorplan Management: Upload and manage floorplan images
- 📍 Waypoint System: Track and manage waypoints within projects
- 📁 File Uploads: Handle file uploads with organized storage
- 👥 User Authentication: Secure user management with session handling
- 🌐 API-First Design: RESTful API with comprehensive endpoint coverage
├── frontend/ # Next.js React application
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # Reusable UI components
│ │ ├── structures/ # Complex UI structures
│ │ └── styles/ # Global styles and themes
│ └── package.json
├── backend/ # Python Litestar API
│ ├── src/
│ │ ├── controllers/ # API route handlers
│ │ ├── models/ # Database models
│ │ └── utilities/ # Helper functions
│ ├── tests/ # Test suite
│ └── pyproject.toml
├── Caddyfile # Reverse proxy configuration
└── start-*.sh # Example development workflow scripts
- Python ~3.12.0
- Node.js (latest LTS)
- PostgreSQL
- Redis
- Caddy (for reverse proxy)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
poetry install --with dev
-
Configure your database and Redis connections in
backend.config.toml -
Run the development server:
litestar --app src:untitled run --debug --reload --host 127.0.0.1 --port 10000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the development server:
npm run dev
The included start-*.sh scripts demonstrate how to set up a complete development environment using tmux to manage multiple services simultaneously. These scripts show an example workflow for running:
- Backend API server (port 10000)
- Frontend development server (port 10001)
- Caddy reverse proxy
- Type checking (pyright)
- Text editor
You can use these as a reference to create your own development setup that suits your workflow and environment.
The API is organized around these main resources:
- Projects:
/api/projects/*- Project management - Floorplans:
/api/projects/{id}/floorplans/*- Floorplan CRUD operations - Waypoints:
/api/projects/{id}/floorplans/{id}/waypoints/*- Waypoint management - Uploads:
/api/projects/{id}/floorplans/{id}/waypoints/{id}/uploads/*- File upload handling per specific waypoint - Users:
/api/users/*- User management and authentication - Sessions:
/api/sessions/*- Session management
Static files are served at /media/* through Caddy.
The project uses several tools for code quality:
Backend:
- Linting:
rufffor Python code formatting and linting - Type Checking:
pyrightfor static type analysis - Testing:
pytestwith async support and parallel execution
Frontend:
- Linting: ESLint with React and Next.js rules
- Type Checking: TypeScript with strict configuration
- Styling: Tailwind CSS with custom configurations
Run backend tests:
cd backend
pytestCheck test coverage:
cd backend
coverage run -m pytest
coverage htmlFrontend:
cd frontend
npm run build
npm startBackend:
cd backend
# Configure production settings in backend.config.toml
litestar --app src:untitled run --host 0.0.0.0 --port 10000- Backend Config:
backend/backend.config.toml- Database, Redis, and security settings - Frontend Config:
frontend/next.config.mjs- Next.js configuration - Proxy Config:
Caddyfile- Reverse proxy and static file serving
This project is licensed under the MIT License - see the LICENSE file for details.