This is an e-commerce store built as a practice project during the upLeveled web development bootcamp. The site is simulating a real e-commerce shopping experience excluding the payment process and without saving any personal data.
- Next.js
- PostgreSQL
- Emotion
Languages:
- Javascript
- JSX
- Typescript
- TSX
(insert pictures)
- Clone the project on your local machine (run each line individually):
git clone <url>
cd <repo name>
yarn
- Connect to default database as admin:
- On Windows
psql -U postgres
- On macOS
psql postgres
- On Linux
sudo -u postgres psql
- Set up the database:
CREATE DATABASE <database name>;
CREATE USER <user name> WITH ENCRYPTED PASSWORD '<user password>';
GRANT ALL PRIVILEGES ON DATABASE <database name> TO <user name>;
- After queries are successfully ran, quit
psql
and connect to the database
\q
- On Windows & macOS
psql -U `<user name>` `<database name>
- On Linux
sudo -u <user name> psql -U <user name> <database name>
- In the repository's directory, run migrations using ley:
yarn migrate up
- Create a .env file:
- Open the project in your code editor
- Copy the content of the .env.example file into the .env file
- Replace XXXXXXXX with the access information
- add .env file to .gitignore
- (Optional) Start development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
Heroku was used to deploy this site,
- Sign up for Heroku: https://signup.heroku.com/
- Create a new App
- Choose a name and select the "Europe" Region
- Click on the button in the middle called "Connect to GitHub"
- Search for your repository in the search box at the bottom of the page and click on the "Connect" button
- Click on the button for "Enable Automatic Deploys"
- Go back to the Overview tab and click on "Configure Add-On"
- Search for "Postgres" and select "Heroku Postgres" from the results
- Deploy your app
Now everything should be up and running! Congratulations :)