The backend REST API for the Cloudkeep application, handling data persistence, authentication, and file storage. Built with Node.js, Express, and MongoDB, and integrates with Cloudinary for media assets.
- RESTful API: Structured endpoints for Thoughts and Notes management.
- Cloud Database: Data storage using MongoDB (via Mongoose).
- File Storage: Integration with Cloudinary for image and file uploads.
- Middleware: Custom middleware for error handling and request processing.
- CORS Support: Configured for secure cross-origin requests.
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (Mongoose ODM)
- Storage: Cloudinary
- Utilities: Multer (file handling), Dotenv
-
Clone the repository:
git clone https://github.com/dineshingale/Cloudkeep-server.git cd Cloudkeep-server -
Install dependencies:
npm install
-
Environment Setup: Create a
.envfile in the root directory and configure the following variables:PORT=5000 MONGODB_URI=your_mongodb_connection_string CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
-
Run Development Server:
npm run dev
The server will start on
http://localhost:5000. -
Run in Production:
npm start
src/
├── config/ # Configuration files (DB, Cloudinary)
├── controllers/ # Route logic
├── models/ # Mongoose schemas
├── routes/ # API route definitions
├── middleware/ # Express middleware
├── utils/ # Helper functions
└── server.js # Entry point
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/thoughts |
Retrieve all thoughts |
POST |
/api/thoughts |
Create a new thought |
PATCH |
/api/thoughts/:id |
Update a thought |
DELETE |
/api/thoughts/:id |
Delete a thought |
(Note: Refer to routes/ for the complete API map) |
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-api). - Commit your changes (
git commit -m 'feat: add new endpoint'). - Push to the branch (
git push origin feature/new-api). - Open a Pull Request.