Skip to content
generated from Aleydon/Next15

This is a modern, mobile-first e-commerce platform designed for selling clothing, shoes, and fashion accessories. The application features a fully functional shopping cart, secure user authentication via email/password and Google Sign-In, and a responsive design optimized for all devices.

Notifications You must be signed in to change notification settings

Aleydon/e-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bewear

This is a modern e-commerce application built with Next.js, offering a robust and scalable platform for selling clothes, sneakers, and more.

✨ Features

  • Product Catalog: Browse and search for products by category.
  • Product Variants: Select different product variations (e.g., size, color).
  • Shopping Cart: Add, remove, and update products in the cart.
  • Authentication: User sign-up and sign-in with Google.
  • Responsive Design: Fully responsive layout for a seamless experience on any device.

🚀 Technologies

This project is built with a modern tech stack, including:

📦 Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/e-commerce.git
    cd e-commerce
  2. Install dependencies:

    yarn install
    # or
    npm install
  3. Set up environment variables:

    Create a .env file in the root of the project and add the following variables:

    DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
    # Add other environment variables from enviroment-example.env

    You can use the enviroment-example.env file as a template.

  4. Start the database:

    This project uses Docker to run a local PostgreSQL database.

    yarn docker:start
  5. Run database migrations:

    Apply the database schema to your local database.

    yarn drizzle
  6. Seed the database:

    Populate the database with initial data.

    yarn db:seed

Running the Application

To start the development server, run:

yarn dev

Open http://localhost:3000 with your browser to see the result.

📜 Available Scripts

  • dev: Starts the development server.
  • build: Creates a production build.
  • start: Starts the production server.
  • lint: Lints the codebase using ESLint.
  • docker:start: Starts the Docker container for the database.
  • docker:stop: Stops the Docker container for the database.
  • drizzle: Pushes the database schema changes.
  • drizzle:generate: Generates SQL migration files.
  • drizzle:studio: Opens the Drizzle Studio.
  • drizzle:migrate: Applies pending migrations.
  • db:seed: Seeds the database with initial data.
  • test: Runs the test suite.
  • test:watch: Runs the test suite in watch mode.
  • commit: A utility script to help with conventional commits.
  • storybook: Starts the Storybook development server.
  • build-storybook: Builds the Storybook for deployment.

🏗️ Project Structure

The project structure is organized as follows:

.
├── src/
│   ├── actions/        # Server actions
│   ├── app/            # Next.js App Router pages and layouts
│   ├── components/     # Reusable UI components
│   ├── db/             # Drizzle ORM schema and seed scripts
│   ├── helpers/        # Helper functions
│   ├── hooks/          # Custom React hooks
│   ├── lib/            # Library and utility functions
│   └── providers/      # React context providers
├── drizzle/            # Drizzle ORM output
...

🔐 Authentication

Authentication is handled by Better Auth, which provides a simple and secure way to manage user authentication. The configuration can be found in src/lib/auth.ts and the API route in src/app/api/auth/[...all]/route.ts.

🧪 Testing

This project uses Jest and React Testing Library for testing. Test files are located alongside the files they are testing or in the .jest directory.

To run the tests, use the following command:

yarn test

🤝 Contributing

Contributions are welcome! Please follow the Conventional Commits specification for commit messages.

To contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (yarn commit)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

This is a modern, mobile-first e-commerce platform designed for selling clothing, shoes, and fashion accessories. The application features a fully functional shopping cart, secure user authentication via email/password and Google Sign-In, and a responsive design optimized for all devices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published