❗❗❗DISCLAIMER❗❗❗
The project is currently not working in Vercel, so you must download it locally.
NodeJS version: v16.13.1
- You must install NodeJS v16.13.1
- Run
npm install --save --save-dev
in the project root folder - Run
npm run dev
to start the development environment
This is a simple learning project that I made with the intention to get into TypeScript. It's a simple shop, using which you can:
- Register
- Login
- Browse and filter products
- Search for products
- Add products to cart
- Change website theme
For the front-end I'm using NextJS with styled-components for the styles and TypeScript.
For the back-end I'm using NextJS's API Routes.
Well, firstly I'm a ReactJS developer and this project was made with the intention for me to learn TypeScript. Then I chose styled-components, because I like the flexibility it gives me while writing CSS and at the same time both the logic and the style is in the same file, which makes it easy to read and understand.
I chose API Routes, since it's already integrated into NextJS and at the same time I don't have a lot of requirements, since the project was not meant to scale. Then for the database I chose Sqlite, since I only need a small database.
- Components -
/components
- Context API -
/context
- Styles -
/styles
- Pages -
/pages
- Types -
/types
- API routes -
/pages/api
- Migrations -
/migrations
- Initial -
./database.js
- Database -
./database.sqlite
success
- The operation was successfuldb-error
- There was an error in the database{something}-exists
- The thing we are trying to add already exists in the databaseinvalid-data
- The data we are providing does not match the required datainvalid-email
- There is no such userinvalid-password
- User exists, but the password is wrongupdated
- Databse item updateddeleted
- Database item deleted