This is an app developed in NextJS and React using Typescript. It is mainly a catalog used in door to door sales. Several sellers can access with their own credentials. Feel free to request a tour through the app.
You can visit the site here! :rocket:
- Typescript
- React
- NextJs
- MongoDb
Make sure both node.js and npm are installed on your OS.
- Fork the project.
- Clone project using
git clone [email protected]:<YOUR-USERNAME>/online-catalog.git. - Navigate into the project using
cd online-catalog. - Run
npm install - Run
npm run dev. - Now the app is running at
localhost:3000.
Disclaimer: you need to generate your own MongoDb env variables.
All logic contained in the src/app folder.
- App: Here is the main logic for the app.
- Componentes: Every React component used.
- Data: Schemas used for Mongoose and types declaration.
- Services: Utilities logic, database insertions, file management, etc.
We iterate through a list of products stored in a MongoDb database. We organize
them in groups of 2, which are organized themselves in groups of 3 columns, which
then again, are organized in 6 rows per page. All this logic is present in
home.tsx as well as some helper functions in order to make code more readable.
This process is only done once, that is to save resources and not query the
database every single time, since changes only happen once a day. The app has
it's own Admin Panel which provides a refresh button that basically
resets the cache.
The app also counts with several utilities which can be found in the Services
folder. These files provide helpers for dealing with database connections,
product creation and authentication.
The admin panel is reserved for the super user. It provides features to create, edit and remove products. Products can be moved in their own category, inserted and searched by name.
This site was deployed using railway.
