Skip to content

mmaurii/SELFIE

 
 

Repository files navigation

SELFIE - Personal Productivity Web App

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.

Tech Stack

  • Node.js (ES modules)
  • Express
  • Passport (passport-local) + express-session
  • MongoDB (mongodb driver)
  • rrule for recurring events
  • ical-generator for calendar export

Project Structure

Key folders/files:

  • server.js: Express server, routes, authentication, and business logic
  • DBOperations.js: MongoDB CRUD operations
  • public/: Public login page and assets
  • private/: Authenticated app pages (home, calendar, notes, timer, polls)

Prerequisites

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:

  • EVENT
  • NOTE
  • USER
  • POLL

Installation

  1. Clone the repository.
  2. Install dependencies:
npm install

Run the App

Start the server with:

npm start

By default the app runs on:

  • http://localhost:10255

You can override the port with the PORT environment variable.

Authentication

  • Login page: GET / (served from public/index.html)
  • Register: POST /register
  • Login: POST /login
  • Logout: GET /logout

All routes under /private and most API endpoints require authentication.

Main Features and API Endpoints

Events

  • GET /events: get user events (recurring events are expanded server-side)
  • POST /events: create an event
  • DELETE /events: delete an event by _id
  • GET /events/iCalendar: download user events as .ics

Notes

  • GET /notes: list notes for the authenticated user
  • POST /notes: create a note
  • PUT /notes/:id: update a note
  • DELETE /notes/:id: delete a note

Polls

  • GET /polls: list polls and voting status for current user
  • POST /polls: create a poll
  • POST /polls/vote: vote on a poll option

Session Date Helpers

  • GET /get-today: get the current date stored in session
  • POST /setToday: update the session date

Private Pages

  • GET /home
  • GET /home/calendario
  • GET /home/note
  • GET /home/timer
  • GET /home/sondaggi

Notes for Development

  • CORS is currently configured for local development (http://localhost:10255).
  • Session cookie secure is set to false for local HTTP development.
  • Passwords are hashed with bcryptjs before being stored.

Available npm Scripts

  • npm start: run the server (node server.js)
  • npm test: placeholder script (no automated tests configured yet)

Current Limitations

  • No automated test suite is included.
  • No environment variable configuration file is currently used.
  • MongoDB URI and DB settings are hardcoded in DBOperations.js.

License

This project is currently marked as ISC in package.json.

About

SELFIE is a Node.js and MongoDB productivity app with secure login, recurring calendar events, notes, Pomodoro timer, polls, and iCalendar export.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors

Languages

  • JavaScript 63.6%
  • CSS 23.0%
  • HTML 13.4%