A simple e-commerce app that allows users to add items to a cart and checkout. It is built with Next.js, Material UI, and TypeScript. It is a work in progress.
First, clone the repository:
git clone https://github.com/tora-o/next-e-commerce.git
cd next-ecommerce-appThen, install the dependencies:
npm installThen, create a .env.development.local file in the root directory, see .env.example for an example.
Then, apply migrations and generate Prisma client (make sure you have a PostgreSQL database running)
# Make sure you have a PostgreSQL database running
npm run prisma:generate
# This will apply migrations and seed the database
npm run prisma:migrate:dev
# If seed fails, run this command
npm run prisma:seed:devThen, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
To run the tests:
npm run test
npm run test:watch
npm run test:cov
npm run test:ciTo run the linter:
npm run lintTo generate new files:
npm run generate
# Select the file you want to generate from the listTo build the app:
# Build the app locally
npm run build:local
# Run the app
npm run startNOTE: This project is still a work in progress. I will be adding more features and functionality in the future.
- You can import postman collection from postman directory to test the API endpoints. Also import the environment as the collection depends on it.
- See Documentation for more information.