This is a simple product renting and buying application built as part of a coding challenge.
- Introduction
- Features
- Technologies Used
- Getting Started
- Project Structure
- Further Development
- Author
- License
Teebay is a web application that allows users to buy, rent, and sell products. The application is divided into a frontend (React), backend (Node.js with Express), and uses PostgreSQL for the database.
- User Authentication:
- User registration and login with JWT.
- Product Management:
- Add, edit, and delete products (multi-step form).
- User-specific product listings.
- Product Listing:
- Browse all products with category filtering, and user filtering.
- Pagination for improved performance.
- View product details, and buy or rent the product.
- Browse all products with category filtering, and user filtering.
- Product Buying/Renting:
- Ability to buy or rent products
- Displays user specific rented or bought products.
- Frontend:
- React
- Apollo Client (for GraphQL)
- React Router (for navigation)
- Backend:
- Node.js
- Express.js (with apollo-server)
- GraphQL
- Prisma (ORM)
- jsonwebtoken
- bcrypt
- Database:
- PostgreSQL
- Node.js (v16 or higher)
- npm or yarn
- PostgreSQL
- Docker (Optional)
-
Clone the repository:
git clone https://github.com/SyedIshmumAhnaf/teebay-website.git cd teebay-website -
Backend Setup:
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in the backend directory:
DATABASE_URL="your_database_url" JWT_SECRET="your_secret_key"
Replace
your_database_urlandyour_secret_keywith your database url and secret key respectively.-
Setup Database migrations:
npx prisma migrate dev
-
Seed Database
node seed.js
-
-
Frontend Setup:
-
Navigate to the frontend directory:
cd frontend/teebay-frontend -
Install dependencies:
npm install
-
-
Start the backend:
cd backend npm start -
Start the frontend:
cd frontend/teebay-frontend npm start -
Open your browser and navigate to
http://localhost:3000for the frontend andhttp://localhost:4000for the backend.
The following features are in the roadmap:
- Implement a proper product buy/rent feature.
- Improve UI and UX and make it responsive for all devices.
- Add proper testing for all components and backend.
- Implement a token refresh mechanism for a better security.
- Dockerize the application for deployment.
- Add more filters to the product listing page.
Syed Ishmum Ahnaf