Bookstore e-commerce focused on functionalities, not on design.
The bookstore has following functionalities:
- Order books through a multi-step form
- Register / Authenticate with Google
- Register / Authenticate with email and password
- View all-time personal orders in profile
- View current order status
The app is built using Next.JS
with Chakra UI
and Redux
for state management.
Data is stored in a MongoDB Atlas
cluster.
- Clone the server
git clone https://github.com/JusticeBringer/golden-book-bookstore-api.git
- Install required dependencies of the server
npm i
- Start, in this order,
mongod
andmongo
processes - Add a
.env
file withNODE_ENV=development
- Add a
.env.development
and fill in the variables similar to the.env.development.example
file - Run
npm run start_local
on the server - Clone the web app
git clone https://github.com/JusticeBringer/golden-book-bookstore-web.git
- Install required dependencies of the web app
npm i
- Run
npm run dev
on the web app
User adds some books to cart by clicking „Add to cart” and then goes to „Cart” page. Fills in the checkout details and goes to account page to see the order summary.
This is the order in the database:
For those who are not authenticated, a modal will appear before entering the checkout process.
There are 2 ways for registration:
- With Google account
- By email and password.
On 8 June 2022, registration by email and password will be closed.
Each user is saved into the database
If user clicks the activation link again, he will get this message:
(before user clicks the activation link, the field isVerifiedEmail
has value of false
)
This project uses Redux
as the state container management, wrapped in next-redux-wrapper npm package.
All reducers used:
export const allReducers = combineReducers({
authenticated: authenticationReducer,
shoppingCart: shoppingCartReducer,
books: booksReducer,
updatingStore: updatingStoreReducer,
snackbar: snackbarReducer,
user: userReducer
});
Below is a view on the Redux state and some actions that were dispatched.
import { Document } from 'mongoose';
All database models extend Document
from mongoose
and use Typescript
interfaces, so every model can raise compile errors.
Project models:
- admin
- book
- cd
- order
- payment
- review
- user
Below is a view of the mailgun dashboard, where we can see emails sent for users email activation.
Please note that, as stated above, on 8 June 2022, registration by email and password will be closed, hence also the email activation links.
- Next.JS with Chakra UI, Typescript, SCSS
The web app is hosted on Heroku here
API is also hosted on Heroku here
- Me - Gabriel Arghire 100%
License of this project is GNU GPL v3