# MYP Project Development Guidelines

## System Architecture
- **Frontend**: 
  - Located in `packages/reservation-platform`
  - Runs on a Raspberry Pi connected to company network
  - Has internet access on one interface
  - Connected via LAN to an offline network
  - Serves as the user interface
  - Developed by another apprentice as part of IHK project work
  
- **Backend**:
  - Located in `backend` directory
  - Flask application running on a separate Raspberry Pi
  - Connected only to the offline network
  - Communicates with WiFi smart plugs
  - Part of my IHK project work for digital networking qualification

- **Printers/Smart Plugs**:
  - Printers can only be controlled (on/off) via WiFi smart plugs
  - No other control mechanisms available
  - Smart plugs and printers are equivalent in the system context

## Build/Run Commands
- Backend: `cd backend && source venv/bin/activate && python app.py`
- Frontend: `cd packages/reservation-platform && pnpm dev`
- Run tests: `cd backend && python -m unittest development/tests/tests.py`
- Run single test: `cd backend && python -m unittest development.tests.tests.MYPBackendTestCase.test_name`
- Check jobs manually: `cd backend && source venv/bin/activate && flask check-jobs`
- Lint frontend: `cd packages/reservation-platform && pnpm lint`
- Format frontend: `cd packages/reservation-platform && npx @biomejs/biome format --write ./src`

## Code Style
- **Python Backend**:
  - Use PEP 8 conventions, 4-space indentation
  - Line width: 100 characters max
  - Add docstrings to functions and classes
  - Error handling: Use try/except with specific exceptions
  - Naming: snake_case for functions/variables, PascalCase for classes
  
- **Frontend (Next.js/TypeScript)**:
  - Use Biome for formatting and linting (line width: 120 chars)
  - Organize imports automatically with Biome
  - Use TypeScript types for all code
  - Use React hooks for state management
  - Naming: camelCase for functions/variables, PascalCase for components

## Work Guidelines
- All changes must be committed to git
- Work efficiently and cost-effectively
- Don't repeatedly try the same solution if it doesn't work
- Create and check notes when encountering issues
- Clearly communicate if something is not possible so I can handle it manually