SkyNotes is a premium, full-stack notes management application featuring a robust REST API backend built with Node.js, Express, and MongoDB Atlas, paired with a modern, glassmorphic dark-mode web user interface.
- Backend: Node.js, Express.js
- Database: MongoDB Atlas (Cloud) / Local MongoDB
- ODM (Object Data Modeling): Mongoose
- Frontend: Vanilla HTML5, CSS3 (Glassmorphism, custom animations), and Javascript (async fetch API)
- Environment Management: dotenv
- Development Helper: nodemon
- MVC (Model-View-Controller) Design: Clean separation of concerns between data schemas, business logic, and routing routes.
- Full CRUD REST Endpoints: Exposes stable JSON-based endpoints for note creation, retrieval, updates, and deletion.
- Custom Request Validation: Middleware verifying request bodies before reaching controllers to ensure data sanitization.
- Centralized Error Handling: Centralized Express error middleware managing MongoDB cast errors, schema validations, and runtime server errors.
- DNS SRV Bypass Fallback: Configured database connection module supporting direct node shard lists to bypass local network DNS lookup restrictions (
querySrv ECONNREFUSED). - Responsive Dark Theme UI: Smooth hover animations, CSS grids, category-specific tags, and animated toast feedback notifications.
notes-api/
├── config/
│ └── db.js # Database connection configuration
├── controllers/
│ └── noteController.js # CRUD controller actions
├── middleware/
│ ├── errorHandler.js # Centralized global error handling
│ └── validateNote.js # Input request validation
├── models/
│ └── Note.js # Mongoose schema and schema validations
├── public/ # Static asset server directory
│ ├── app.js # Frontend UI logic and API fetch integration
│ ├── index.html # Main HTML structure
│ └── style.css # Premium glassmorphic styles & keyframes
├── routes/
│ └── noteRoutes.js # Express routing endpoints
├── .env.example # Environment variables template
├── .gitignore # Files excluded from git tracking
├── package.json # Scripts and packages manifest
└── server.js # App entry point and middleware assembly
git clone https://github.com/aryanbnrj/notes-api.git
cd notes-apinpm installCreate a .env file in the root of the project (copying .env.example as a template):
PORT=3000
MONGO_URI=your_mongodb_connection_stringFor local development with automatic hot-restarts:
npm run devFor production execution:
npm startOnce running, navigate to http://localhost:3000 in your browser to view the interface.
| Endpoint | Method | Description | Request Body Structure |
|---|---|---|---|
/api/notes |
GET |
Retrieve all notes sorted by date (newest first) | None |
/api/notes/:id |
GET |
Retrieve a single note | None |
/api/notes |
POST |
Create a new note | {"title": String, "content": String, "category": String} |
/api/notes/:id |
PUT |
Update an existing note | {"title": String, "content": String, "category": String} |
/api/notes/:id |
DELETE |
Delete a note | None |