GitHunt
SA

Sadiastic/Sadiastic-Full-Stack-Clothing-Store

This project was built for my DBMS course at university using the MERN Stack, combining my skills in technology and my entrepreneurial drive.

How to Setup and Run the Project

Prerequisites

  1. Install Node.js:

  2. Install Git:

  3. MongoDB and Stripe:

    • Set up a MongoDB database and Stripe account for payment processing.

Steps to Run the Backend

  1. Open the project folder in VS Code or any code editor.
  2. Navigate to the backend folder:
    cd backend
  3. Install dependencies:
    npm install
  4. Configure the .env file:
    • Add the following variables to the backend/.env file:
      MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>
      STRIPE_SECRET_KEY=your_stripe_secret_key
      PORT=5000
    • Replace <username>, <password>, and <dbname> with your MongoDB credentials.
    • Add your Stripe secret key.
  5. Start the backend server:
    npm run server
    • The backend will run at http://localhost:5000.

Steps to Run the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the frontend:
    npm run dev
  4. Open the application:
    • The frontend will run at http://localhost:5173. Open this link in your browser.

Steps to Run the Admin Panel

  1. Navigate to the admin folder:
    cd admin
  2. Install dependencies:
    npm install
  3. Start the admin panel:
    npm run dev
  4. Open the admin panel:
    • The admin panel will run at http://localhost:5174. Open this link in your browser.

Notes

  1. Ensure the backend server is running before starting the frontend or admin panel.
  2. Database Setup:
    • MongoDB must be running, and your database should have the appropriate collections (users, products, orders).
  3. Stripe Payments:
    • Payments will only work if Stripe is correctly configured in the .env file.
  4. Environment Variables:
    • Ensure all required variables are correctly set in the respective .env files.

Troubleshooting

  • If you encounter any issues, check the terminal logs for errors.
  • Ensure Node.js and MongoDB are correctly installed and running.
  • Clear the browser cache if the frontend or admin panel fails to load.

For further assistance, feel free to reach out!

Languages

JavaScript98.6%CSS0.7%HTML0.7%

Contributors

Created December 21, 2024
Updated November 28, 2025