How praveen02102004/daily-notes works
Daily-notes is a web app for registering or logging in, organizing personal topics, and writing notes within a selected topic. Its principal workflow moves from an authenticated user to the topic list, then to a topic’s note editor, where changes are saved. The routes, session handling, database queries, and authentication logic are implemented together in index.js; EJS templates provide the rendered pages. The repository does not show a separate notes-storage layer or schema, so database relationships are limited to queries visible in the route handlers.
Main entry points: index.js Registration and login · topic.ejs Topic page · content.ejs Note editor · index.ejs Landing page
Components 13
Identity and sessions
- Registration and login
index.js - Session handling
index.js - Password hashing
index.js
Topic organization
- Topic routes
index.js - Topic lookup
index.js
Note editing
- Note routes
index.js
Page rendering
- Topic page
views/topic.ejs - Note editor
views/content.ejs - Landing page
views/index.ejs - Login page
views/login.ejs - Registration page
views/register.ejs
Other components
- User
- PostgreSQL
Connections 17
- User → Registration and login: submits credentials
index.js - Registration and login → PostgreSQL: queries users
index.js - Registration and login → Password hashing: hashes or checks
index.js - Registration and login → Session handling: sets user session
index.js - User → Topic routes: requests topics
index.js - Topic routes → Topic lookup: loads topics
index.js - Topic lookup → PostgreSQL: queries topics
index.js - Topic routes → PostgreSQL: adds or deletes
index.js - Topic routes → Topic page: renders
index.js - User → Note routes: opens or saves note
index.js - Note routes → PostgreSQL: reads or writes notes
index.js - Note routes → PostgreSQL: looks up topic
index.js - Note routes → Note editor: renders
index.js - User → Landing page: visits home
- User → Login page: opens login
- User → Registration page: opens registration
- Session handling → PostgreSQL: reloads user
index.js