/shop.co-ecommerce

Shop.co is a modern ecommerce platform designed for both young adults and seasoned shoppers, offering a rich selection of over 200 international brands and 2,000 high-quality products. Boasting 30,000+ happy customers, the platform is built using a robust tech stack that includes Next.js for frontend development

Primary LanguageTypeScriptMIT LicenseMIT

Shop.co Ecommerce

🦾 Tech Stack

Here's a quick overview of the tech stack we use in our project:

Frontend

  • Next.js - The React framework for production.
  • Typescript - Strongly typed programming language that builds on JavaScript.
  • Tailwind CSS - A utility-first CSS framework for rapid UI development.
  • Swiper - Powerful and modern touch slider.
  • React PDF - Display PDFs in your React application.
  • Zustand - A simple, fast and scalable bearbones state-management solution.

Backend

  • Node.js - JavaScript runtime for building fast server applications.
  • Prisma - Next-generation ORM for Node.js and TypeScript.
  • PostgreSQL - The World's Most Advanced Open Source Relational Database.
  • NodeMailer - Module for Node.js applications to allow easy email sending.

DevOps and Deployment

  • Docker - Platform for developing, shipping, and running applications.
  • Vercel - Hosting and serverless backend services for web applications.

Testing

  • Jest - Delightful JavaScript Testing Framework.
  • Playwright - Browser automation library to enable cross-browser web testing.

Design

  • Figma - Online UI design and prototyping tool.

Payment Processing

Media Management

  • Cloudinary - Cloud service that offers a solution to a web application's entire image management pipeline.

Miscellaneous

  • Clerk - User management and authentication for modern applications.
  • ShadCn - (If ShadCn is a custom tool or library, you might want to provide more information or remove it if it's not publicly known or relevant to the project).

📘 Documentation

Setting up the project

To get started with the project, follow these steps:

  1. Clone the project repository:

    git clone https://github.com/DeusloVult/shop.co-ecommerce.git
  2. Copy the contents from env.example into a new file named .env.local.

  3. If you are using a local database, start the Docker container:

    docker compose up -d

    Alternatively, if you're connecting to an external database, specify the database connection string in your .env.local file:

    DATABASE_URL="your-database-connection-string"
    
  4. Install the project dependencies using pnpm:

    pnpm install
  5. Apply database migrations to set up the database schema:

    pnpm dlx prisma migrate dev --name init
  6. Start the development server:

    pnpm dev

🚀 Folder Structure

  • Use English for naming folders and files.
  • For creating files, use the format feature-name.ts or feature-name.tsx (e.g., data-products.ts).
  • Create folders to group related files within a category (e.g., components, utils).
  • Manage imports using the Autobarrel extension for better organization and easier access from the main folder.

📝 Contributing

If you wish to contribute to the project, please follow these guidelines:

  1. Clone the repository.
  2. Fetch the latest updates from the main branch:
    git pull
  3. Switch to the development branch:
    git switch dev
  4. Create a new branch for your changes, using a descriptive name:
    git checkout -b feature/your-feature-name
  5. Always pull the latest changes from the dev branch before starting to work on a new feature:
    git pull origin dev
  6. Contribute by opening a Pull Request (PR).
  7. If you encounter any bugs or would like to suggest new features, create an issue and assign the appropriate labels.

👨‍💻 Dummy Data

  • The data folder is responsible for creating mock data for testing.
  • Each data file should be generated using data-generator.ts to ensure consistency.
  • Eventually, this dummy data will be replaced with actual data from the database.

🦉 Seed Data

pnpm prisma:seed

🐛 Bug Report

If you encounter any bugs or would like to suggest new features, create an issue and assign the appropriate labels.

🔐 Kinde Auth

👏 Thanks to all our contributors