A BeReal-style mental health app where users receive daily notifications to answer mental health questions and see anonymous responses from others.
- User authentication (JWT)
- Daily mental health questions
- Anonymous response sharing
- Scheduled notifications (cron job)
- Dark theme UI
- Backend: Node.js, Express, PostgreSQL
- Frontend: React, TypeScript, Vite
- Authentication: JWT
- Styling: Custom CSS
- Node.js (v14+)
- PostgreSQL
- npm or yarn
- Install PostgreSQL and create a database:
psql -U postgres- Run the schema file:
psql -U postgres -f database/schema.sqlCreate a .env file in the root directory:
PORT=5000
DATABASE_URL=postgresql://postgres:password@localhost:5432/basket_db
JWT_SECRET=your_jwt_secret_here_change_this_in_production
NODE_ENV=development
- Install backend dependencies:
npm install- Install frontend dependencies:
cd client
npm install
cd ..- Start both backend and frontend:
npm run dev:fullThis will start:
- Backend server on http://localhost:5000
- Frontend on http://localhost:5173
- Or run them separately:
# Backend only
npm run dev
# Frontend only (in another terminal)
npm run clientPOST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/questions/today- Get today's questionPOST /api/questions/respond- Submit responseGET /api/questions/my-responses- Get user's response history
The app includes a cron job that runs at 12:00 PM daily. In production, this would trigger push notifications to users.
basket/
├── server/
│ ├── index.js # Express server
│ ├── db.js # Database connection
│ ├── middleware/ # Auth middleware
│ └── routes/ # API routes
├── client/ # React frontend
│ └── src/
│ ├── api/ # API client
│ ├── components/ # React components
│ └── contexts/ # Auth context
├── database/
│ └── schema.sql # Database schema
└── .env # Environment variables
- Push notifications (FCM/APNS)
- Response analytics
- More question categories
- Social features
- Progressive Web App support