This TypeScript application leverages the Next.js framework to build a dynamic, server-side rendered (SSR) product website. The site features a full CRUD (Create, Read, Update, Delete) API, with MongoDB as the backend database for storing product information. Each product is uniquely identified by an ID.
For authentication, the app utilizes Kinde Auth for secure user login and management, replacing JWT-based authentication. The application also supports user roles and permissions to control access to various API functions.
Images associated with products are uploaded and managed using the UploadThing service.
The app is fully server-side rendered with Next.js, ensuring fast performance and SEO optimization. Node.js is used on the backend to manage server-side logic and handle API requests.
navigate to /server to see setup instructions
navigate to /client to see setup instructions
express_app/
├── client/
│ ├── src/
│ │ ├── app/
│ │ │ ├── layout.tsx
│ │ │ ├── page.tsx
│ │ │ ├── globals.css
│ │ │ ├── assets/
│ │ │ ├── about-us/
│ │ │ │ └── page.tsx
│ │ │ ├── action/
│ │ │ ├── admin/
│ │ │ │ └── page.tsx
│ │ │ ├── api/
│ │ │ ├── components/
│ │ │ ├── contact-us/
│ │ │ │ └── page.tsx
│ │ │ ├── context/
│ │ │ ├── products/
│ │ │ │ └── page.tsx
│ │ │ ├── utils/
│ │ │
│ │ │
└── server/
├── src/
│ ├── authenticateToken.ts
│ ├── index.ts
│ ├── controller/
│ │ └── controller.ts
│ ├── middlewares/
│ │ └── errorHandler.ts
│ │ └── errors.ts
│ ├── router/
│ │ └── routes.ts
│ └── schema/
│ └── ProductSchema.ts