SELFIE is a university project built with Node.js and Express that combines multiple productivity tools in one place:
- Calendar and event management (including recurring events)
- Notes management
- Pomodoro timer
- Polls and voting
- iCalendar export (
.ics) for events
The app uses session-based authentication with Passport and stores data in MongoDB.
- Node.js (ES modules)
- Express
- Passport (
passport-local) +express-session - MongoDB (
mongodbdriver) rrulefor recurring eventsical-generatorfor calendar export
Key folders/files:
server.js: Express server, routes, authentication, and business logicDBOperations.js: MongoDB CRUD operationspublic/: Public login page and assetsprivate/: Authenticated app pages (home, calendar, notes, timer, polls)
Make sure you have:
- Node.js 18+ (recommended)
- npm
- MongoDB running locally on
mongodb://localhost:27017
The application expects the database name SELFIE and uses these collections:
EVENTNOTEUSERPOLL
- Clone the repository.
- Install dependencies:
npm installStart the server with:
npm startBy default the app runs on:
http://localhost:10255
You can override the port with the PORT environment variable.
- Login page:
GET /(served frompublic/index.html) - Register:
POST /register - Login:
POST /login - Logout:
GET /logout
All routes under /private and most API endpoints require authentication.
GET /events: get user events (recurring events are expanded server-side)POST /events: create an eventDELETE /events: delete an event by_idGET /events/iCalendar: download user events as.ics
GET /notes: list notes for the authenticated userPOST /notes: create a notePUT /notes/:id: update a noteDELETE /notes/:id: delete a note
GET /polls: list polls and voting status for current userPOST /polls: create a pollPOST /polls/vote: vote on a poll option
GET /get-today: get the current date stored in sessionPOST /setToday: update the session date
GET /homeGET /home/calendarioGET /home/noteGET /home/timerGET /home/sondaggi
- CORS is currently configured for local development (
http://localhost:10255). - Session cookie
secureis set tofalsefor local HTTP development. - Passwords are hashed with
bcryptjsbefore being stored.
npm start: run the server (node server.js)npm test: placeholder script (no automated tests configured yet)
- No automated test suite is included.
- No environment variable configuration file is currently used.
- MongoDB URI and DB settings are hardcoded in
DBOperations.js.
This project is currently marked as ISC in package.json.