Run backend:
cd backend
pip install -r requirements.txt
python -m uvicorn main:app --reloadEndpoints:
- GET /api/health – health check
- POST /api/assessment – trigger assessment. Body:
Returns risk object, pdf filename, summary excerpt, and scores.
{"scores":{"stroop_colour":0,"memory_game":0,"image_recall":0},"skip_audio":true,"fast":false,"offline_sentiment":false} - GET /api/assessment/latest – latest PDF filename
- GET /api/reports/{filename} – download PDF
Frontend env var: NEXT_PUBLIC_API_BASE (defaults to http://localhost:8000)
Homepage button "Generate Assessment" (in page.js) calls backend with placeholder scores and renders risk + PDF link.
- Real game score integration
- Firebase auth token on requests
- User-specific history storage
- Streaming progress (SSE/WebSocket) for long audio
- Error boundary & retry UI
See docs/architecture.drawio (open in draw.io / diagrams.net) for the full system architecture and data flow.
This document outlines the development and documentation standards for this project. All team members are expected to follow these guidelines.
To maintain a clean and organized codebase, please place your code in the appropriate directories:
/frontend: All frontend code (e.g., React, Vue, Angular, HTML, CSS, JavaScript) goes here./backend: All backend code (e.g., Node.js, Python, Java, API logic) goes here./database: Database schemas, migration scripts, and seed files belong in this directory./docs: All project documentation, including your personal work logs, should be placed here.
To ensure code quality and collaboration, please follow this Git workflow:
- Create a Branch: For each new feature or task, create a separate branch from the main development branch.
- Push Your Code: Commit and push your changes to your branch on GitHub.
- Create a Pull Request: Once your work is ready for review, open a pull request. Your code will be evaluated before being merged.
Each team member is required to maintain a personal work log to track their contributions and progress.
- Create a Markdown File: In the
/docsdirectory, create a new markdown file namedyour-name.md(e.g.,jane-doe.md). - Log Your Work: For each work session, add a new entry to your file.
- Content: Each entry should include:
- The date.
- A summary of the tasks you completed.
- Any challenges you encountered and how you resolved them.
- Any questions or blockers that need attention.
## 2023-10-27
### What I Did
- Implemented the user authentication flow on the frontend.
- Created the login and registration components.
- Connected the frontend forms to the backend API endpoints.
### Challenges
- Ran into a CORS issue when making API requests from `localhost:3000` to `localhost:5000`.
- **Solution**: Enabled CORS on the backend server for the development environment.
### Next Steps
- Implement profile page for authenticated users.