Mobile Shop - Mr Kumar is a full-stack web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). It allows users to browse and purchase various mobile-related products and services. The platform also provides owners with the ability to manage their product inventory and customer profiles.
The project includes secure user and owner authentication, profile management, product handling, and more. A payment gateway and additional features will be introduced in future updates to enhance the user experience.
-
User and Owner Authentication:
- Users can sign up, log in, and manage their profiles.
- Owners have additional features such as adding and editing products.
-
Product Management:
- Owners can add, edit, and remove products.
- Users can browse through a variety of products including:
- Mobile phones
- Chargers, data cables, and Bluetooth speakers
- Mobile accessories like skins, covers, and glass guards
- Mobile parts such as batteries, screens, speakers, and more
- Service details like mobile repairs, SIM port services, and recharges
-
Profile Management:
- Owners and users can edit their profiles and view their product history.
-
Smooth User Experience:
- A clean, intuitive interface designed for easy navigation.
- Secure operations with JWT-based authentication.
-
Future Plans:
- Payment gateway integration for seamless purchases.
- Additional improvements for performance and user experience.
- Frontend: React.js, Redux for state management
- Backend: Node.js, Express.js
- Database: MongoDB (using Mongoose for ORM)
- Image Management: Cloudinary for image uploads
- Authentication: JWT, bcrypt for password hashing
- Styling: TailwindCSS
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/username/mobile-shop-mr-kumar.git cd mobile-shop-mr-kumar
-
Install dependencies:
-
Backend:
cd backend npm install
-
Frontend:
cd ../frontend npm install
-
-
Environment Variables:
- Create a
.env
file in thebackend
directory with the following keys:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret CLOUDINARY_NAME=your_cloudinary_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- Create a
-
Run the Application:
- Start the backend:
cd backend npm start
- Start the frontend:
cd ../frontend npm start
- Start the backend:
-
Visit
http://localhost:3000
to view the application.
- Register:
/api/v1/register
Allow users and owners to sign up. - Login:
/api/v1/login
Allow users and owners to log in.
- All Products:
/api/v1/products
Get all available products. - Product by ID:
/api/v1/products/:productId
Fetch a specific product by its ID.
- Add/Edit Product:
/api/v1/products/add/:id
Add or edit products. If anid
is provided, the product will be edited.
- Owner Profile:
/api/v1/profile/owner
View the ownerβs profile along with their sold product history. - Edit Owner Profile:
/api/v1/profile/owner/edit/:ownerId
Edit the ownerβs profile. - User Profile:
/api/v1/profile/user/:userId
View the userβs profile along with their purchase history. - Edit User Profile:
/api/v1/profile/user/edit/:userId
Edit the userβs profile.
- addToCart:
/api/v1/cart/add/:productId
Add product via ProductId into cart - removeFromCart:
/api/v1/cart/remove/:productId
Remove product from cart via productId
Here are some key packages used in the backend of this application:
- Express: Web framework for Node.js to build APIs.
- Mongoose: ODM for MongoDB to handle data models.
- dotenv: For environment variable management.
- JWT: For token-based authentication.
- bcrypt: For hashing user passwords securely.
- Multer: For handling file uploads.
- Cloudinary: For storing images in the cloud.
- CORS: For handling cross-origin requests.
-
Payment Gateway Integration:
Add a payment processing system to enable secure online transactions. -
Improved User Experience:
Further optimizations for faster performance and smoother navigation. -
Mobile App Development:
Explore creating a mobile version of the application for Android and iOS.
This project is licensed under the MIT License.
π¨βπ»π Enjoy shopping and managing your mobile products with Mobile Shop - Mr Kumar! Stay tuned for exciting new features in the future.