Skip to content

SyedIshmumAhnaf/teebay-website-incomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Teebay - Product Renting and Buying Application

This is a simple product renting and buying application built as part of a coding challenge.

Table of Contents

Introduction

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.

Features

  • 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.
  • Product Buying/Renting:
    • Ability to buy or rent products
    • Displays user specific rented or bought products.

Technologies Used

  • 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

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • PostgreSQL
  • Docker (Optional)

Installation

  1. Clone the repository:

    git clone https://github.com/SyedIshmumAhnaf/teebay-website.git
    cd teebay-website
  2. Backend Setup:

    • Navigate to the backend directory:

      cd backend
    • Install dependencies:

      npm install
    • Create a .env file in the backend directory:

    DATABASE_URL="your_database_url"
    JWT_SECRET="your_secret_key"

    Replace your_database_url and your_secret_key with your database url and secret key respectively.

    • Setup Database migrations:

      npx prisma migrate dev
    • Seed Database

      node seed.js
  3. Frontend Setup:

    • Navigate to the frontend directory:

      cd frontend/teebay-frontend
    • Install dependencies:

      npm install

Running the Application

  1. Start the backend:

    cd backend
    npm start
  2. Start the frontend:

    cd frontend/teebay-frontend
    npm start
  3. Open your browser and navigate to http://localhost:3000 for the frontend and http://localhost:4000 for 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.

Author

Syed Ishmum Ahnaf

License

MIT License

About

website using react, express, postgresql, and graphql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors