An e-renting website created to improve knowledge in Next.js, React Query, Ant Design, Zustand, Prisma, PostgreSQL, and NextAuth.
-
User Features:
- View all available items.
- Add item to borrow to their carts.
- Request to borrow items from their carts.
- View all requests made by the user.
- Notice if the borrowed item need to be return via FloatButton
-
Admin Features:
- Product dashboard to edit product properties.
- Request dashboard to approve or reject user requests.
-
User Features:
- Edit User profile (name, image, change password)
-
Admin Features:
- User dashboard
-
Frontend:
-
Backend:
- Node.js
- PostgreSQL
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
-
Install dependencies:
pnpm install
-
Set up environment variables: Create a .env file in the root directory and add the following:
DATABASE_URL=postgresql://user:password@localhost:5432/database NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret
-
Run Prisma migrations to set up the database:
pnpm dlx prisma migrate dev
Start the development server via pnpm dev
and then open your browser and navigate to http://localhost:3000
.