Coder Social home page Coder Social logo

arasgungore / ecommence Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 191 KB

An e-commerce app built using React for the frontend and Express for the backend.

License: MIT License

JavaScript 61.49% HTML 17.40% CSS 21.10%
e-commerce e-commerce-app e-commerce-platform e-commerce-project e-commerce-website ecommerce ecommerce-application ecommerce-platform ecommerce-store ecommerce-website

ecommence's Introduction

eCommence

An e-commerce app built using React for the frontend and Express for the backend. This project is a full-fledged e-commerce website built to sell a variety of items, including clothing, jewelry, watches, electronics, and more.

Project Structure

The project is organized into two main directories: backend for the server-side code and frontend for the client-side code.

Backend

The backend is responsible for handling API requests, interacting with the database, and serving data to the frontend.

  • src/controllers/productController.js: Handles product-related logic, including fetching data from the external API.
  • src/models/Product.js: Defines the schema for the product data stored in the database.
  • src/routes/productRoutes.js: Defines the routes for product-related API endpoints.
  • src/app.js: Initializes the Express application, sets up middleware, and connects to the database.

Frontend

The frontend is responsible for presenting the user interface and interacting with the backend to display product information.

  • src/components/ProductList.js: Displays a list of products fetched from the backend.
  • src/components/ProductCard.js: Represents an individual product card with details like name, description, and price.
  • src/pages/Home.js: The main landing page that integrates the ProductList component.
  • src/services/apiService.js: Handles communication with the backend API.

Getting Started

Follow these steps to set up and run the project locally:

  1. Install Dependencies:

    cd ecommence-app/backend
    npm install
    cd ../frontend
    npm install
  2. Run the Backend:

    cd ../backend
    npm start
  3. Run the Frontend:

    cd ../frontend
    npm start
  4. Access the Application: Open your browser and go to http://localhost:3000 to view the application.

Dependencies

  • Backend:

    • Express: Fast, unopinionated, minimalist web framework for Node.js.
    • Cors: Middleware for enabling CORS in Express.
    • Axios: Promise-based HTTP client for the browser and Node.js.
  • Frontend:

    • React: JavaScript library for building user interfaces.
    • React Router: Declarative routing for React.js.
    • Axios: Promise-based HTTP client for the browser and Node.js.

Customize the Project

To adapt this project to your needs:

  • Replace the OpenWeatherMap API endpoint in productController.js with your desired API.
  • Customize the product schema in Product.js according to your data structure.
  • Modify the frontend components and styles in the src/components and src/pages directories.

Contributing

If you would like to contribute to this project, please follow the guidelines in CONTRIBUTING.md.

License

This project is licensed under the MIT License.

Author

👤 Aras Güngöre

ecommence's People

Contributors

arasgungore avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.