This is a full-stack e-commerce application built with Next.js, TypeScript, Tailwind CSS and Drizzle ORM. The database is a MySQL database that can be hosted anywhere that supports MySQL 8+.
- User authentication and registration
- Complete checkout flow
- User profile page
To get started, clone the repository and install the dependencies:
gh repo clone kyrregjerstad/anshin-e-commerce
cd anshin-e-commerce
pnpm install
Copy over the .env.example
file to a new file called .env
and fill in the necessary environment variables.
cp .env.example .env
To start the development server, run the following command:
pnpm dev
This project uses Docker to handle the development backend environment, such as a MySQL db and Redis. To start the backend, run the following command in a new terminal session in the project root:
docker-compose up -d
The db needs to be initialized and seeded before the project can be run. To do this, run the following command:
pnpm db:init
That's it! The full project is now running.
Redis will run on port 6379
. To inspect the Redis key-value store, visit http://localhost:5540 in your browser and use redis:6379
as the host and port in the menu.
In production, Upstash Redis is used.
A MySQL database is used to store the user data. It runs on port 3307
to avoid conflicts with local MySQL installations.
To stop docker, run the following command:
docker-compose down