A full-stack web application for managing and browsing shops in Dompe, Sri Lanka. This platform allows users to discover local shops, view shop details, and shop owners to manage their listings.
- User Authentication: Secure signup and login system with JWT authentication
- Shop Browsing: Browse and search for shops in the Dompe area
- Shop Management: Shop owners can add and manage their shop listings
- Shop Details: View detailed information about each shop including images and contact details
- Responsive Design: Mobile-friendly interface for seamless browsing on any device
- React 19.2.0 - UI library
- Vite - Build tool and development server
- React Router DOM - Client-side routing
- Axios - HTTP client for API requests
- Chart.js & Recharts - Data visualization
- React Slick - Carousel component
- jsPDF - PDF generation
- Zod - Schema validation
- JWT Decode - Token decoding
- Node.js - Runtime environment
- Express 5.1.0 - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication tokens
- bcryptjs - Password hashing
- Multer - File upload handling
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
DOMPELK/
├── dompeweb/ # Frontend React application
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Auth/ # Login & Signup
│ │ │ ├── home/ # Home page
│ │ │ ├── Nav/ # Navigation
│ │ │ ├── shops/ # Shop listing & details
│ │ │ └── adshops/ # Add shop form
│ │ ├── utils/ # Utility functions
│ │ └── assets/ # Static assets
│ └── public/ # Public assets
│
└── server/ # Backend Node.js application
├── controllers/ # Request handlers
├── models/ # Database models
├── routes/ # API routes
├── Uploads/ # Uploaded files
└── Item_images/ # Shop images
- Node.js (v14 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn
-
Clone the repository
git clone https://github.com/Lahindu2001/DOMPE.LK.git cd DOMPELK -
Setup Backend
cd server npm install -
Create environment file
Create a
.envfile in theserverdirectory:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
-
Setup Frontend
cd ../dompeweb npm install
-
Start Backend Server
cd server npm run devServer will run on
http://localhost:5000 -
Start Frontend Development Server
cd dompeweb npm run devApplication will run on
http://localhost:5173
POST /api/auth/signup- Register new userPOST /api/auth/login- User login
GET /api/shops- Get all shopsGET /api/shops/:id- Get shop by IDPOST /api/shops- Create new shop (requires authentication)PUT /api/shops/:id- Update shop (requires authentication)DELETE /api/shops/:id- Delete shop (requires authentication)
GET /api/users/profile- Get user profile (requires authentication)PUT /api/users/profile- Update user profile (requires authentication)
cd dompeweb
npm run buildThis creates an optimized production build in the dist folder.
The backend is production-ready. Ensure environment variables are properly set in your hosting environment.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
- Lahindu2001 - GitHub Profile
For any queries or suggestions, please open an issue in the GitHub repository.
Made with ❤️ for the Dompe community