This project is a technical test for evaluating candidates' coding skills. It's a mental wellbeing tracking application that allows users to record their emotions between therapy sessions.
/frontend- Next.js application with Styled Components/backend- Express.js server with MongoDB database- Docker configuration for easy setup
- Docker and Docker Compose
- Clone the repository
- Run Docker Compose:
docker compose upThis will start:
- Frontend at http://localhost:3000
- Backend at http://localhost:5050
- MongoDB at localhost:27017
The application includes a system to generate test data, making it easier to test the functionalities.
-
Users:
- Email:
test@example.com/ Password:password123(role: user) - Email:
admin@example.com/ Password:admin123(role: admin) - Email:
maria@example.com/ Password:maria123(role: user with therapist)
- Email:
-
Emotions: Each user has 15 random emotion records from the last 30 days.
-
Manual (from command line):
cd backend npm run seed -
Automatic (during Docker startup):
- Edit the
docker-compose.ymlfile - Change the
SEED_DATABASEenvironment variable totrue:
backend: # ... environment: - MONGO_URI=mongodb://mongodb:27017/emotionaltracker - JWT_SECRET=mysecretkey123 - SEED_DATABASE=true # Change to true to generate test data
- Restart containers:
docker compose down && docker compose up
- Edit the
As a candidate, you are expected to implement the following features:
-
Backend Implementation for Emotion Tracking
- The UI for tracking emotions is already built
- Implement the backend API to store and retrieve emotion entries
- Add proper validation and authentication
-
Wellness Reminder System
- Create a system to remind users about wellness activities
- Implement both frontend and backend components
-
Therapist Data Sharing (Bonus)
- Implement a feature to share emotional data with therapists
- Consider privacy and security aspects
- POST
/api/users/register- Register a new user - POST
/api/users/login- Login a user - GET
/api/users/profile- Get user profile (protected)
- GET
/api/emotions- Get all emotions for a user (protected) - GET
/api/emotions/:id- Get a specific emotion - POST
/api/emotions- Create a new emotion entry (protected) - PUT
/api/emotions/:id- Update an emotion (protected)
- Frontend: Next.js, Styled Components, JavaScript
- Backend: Express.js, MongoDB, JWT authentication
- Infrastructure: Docker, Docker Compose