: π Delala.com β Fast, Secure, and Hassle-Free Car Marketplace Delala.com is your ultimate online platform for buying and selling cars in Ethiopia. We make the car shopping experience simple, secure, and stress-free.
π Delala.com Backend β Car Marketplace API
A clean and developer-friendly Node.js + Express + MongoDB backend for the Delala.com platform.
This project is a starter template for building car marketplace platforms focused solely on cars.
π Features
β
JWT Authentication (Register, Login, Logout)
β
Secure password hashing with bcrypt
β
Car management: Add, update, delete, view cars
β
Image uploads via Cloudinary + Multer
β
MongoDB with Mongoose models
β
Role-based access (user vs admin)
β
Clean & modular code structure
β
Ready to connect with frontend at
localhost
βοΈ Installation
1οΈβ£ Clone the repository
git clone
github.com
cd delala-backend
2οΈβ£ Install dependencies
npm install
3οΈβ£ Setup environment variables
Create a .env file in the root folder:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
CLOUD_NAME=your_cloudinary_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret
4οΈβ£ Run the server
# Development
npm run dev
# Production
npm start
Server runs at:
localhost
π API Endpoints
Auth Routes (/api/auth)
Method Endpoint Description
POST /register Register new user
POST /login Login user + get JWT
POST /logout Logout user
Car Routes (/api/cars)
Method Endpoint Description
POST / Add new car (authenticated, with image)
GET / Get all cars
GET /:id Get single car by ID
PUT /:id Update car (only owner can update)
DELETE /:id Delete car (owner or admin only)
π οΈ Tech Stack
Backend: Node.js, Express.js
Database: MongoDB + Mongoose
Authentication: JWT + bcrypt
Image Storage: Cloudinary + Multer
Frontend: Vite + React (runs on
localhost
)
π€ Contributing
Want to improve the project?
Fork the repository
Create a new branch
Make your changes
Submit a pull request π
π License
MIT License Β© 2025 Delala.com