25 lines
1.2 KiB
Markdown
25 lines
1.2 KiB
Markdown
# MYP Project Development Guidelines
|
|
|
|
## 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 |