E-commerce website made with Next.js, TailwindCSS, Prisma and PostgreSQL.
Home Page | Login Page |
---|---|
Clone project
git clone git@github.com:Chelny/e-commerce.git
Fill Environment File
Navigate to the root directory of the project. Create a new file named .env
and fill it with the required environment variables based on the provided .env.example
file.
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
AUTH_GOOGLE_ID=
AUTH_GOOGLE_SECRET=
AUTH_SECRET=
DATABASE_URL="postgresql://<username>:<password>@<host>:<port>/<database_name>?schema=public&serverTimezone=UTC"
NEXT_PUBLIC_RESEND_API_KEY=
- Register a OAuth application on Github to get the ID and secret
- Register a OAuth application on Google to get the ID and secret
- Generate an auth secret (Mac/Linux:
openssl rand -base64 32
) - Change the DATABASE_URL placeholders to your database info
- Create an account at resend.com to send emails
Start PostgreSQL Server
# Mac and Linux Command
sudo service postgresql start
Seed the Database
pnpm exec prisma db seed
Add initial data in the database.
Browse Your Data
pnpm exec prisma studio
This command opens Prisma Studio, a visual interface for exploring and managing your data. Use it to inspect the data in your database at http://localhost:5555.
Then, on another terminal...
Install Dependencies
pnpm i
Serve the Client
pnpm run dev
This command starts the development server, allowing you to access your application locally at http://localhost:3000.