Skip to content

vanshdhar999/College-ecommerce

Repository files navigation

CollegeBay

Empowering student communities through a unique e-commerce platform. Buy and sell with ease as college students connect to exchange products within their community. Affordable essentials for every student, fostering a culture of support and accessibility.

App Setup (localhost)

  1. Install node.js compatible with your system from the official website .

  2. Install npm on your desktop from terminal .

 npm install
  1. Check the versions of Node.js and npm in the command prompt.
node -v
npm -v
  1. Open a directory of your choice on your system and clone the GitHub repository using Git Bash.
 git clone https://github.com/vanshdhar999/College-ecommerce
  1. Open the cloned folder in VS Code and run the following command in the terminal to install necessary packages.
 npm i daisyui prisma @prisma/client next-auth @auth/prisma-adapter prettier eslint-config-prettier prettier-plugin-tailwindcss

Deployment

Run the following command in the VS Code terminal .

 npm run dev

Prisma Deployment

Create MonogDB database and define the query field for your data. Run

npx prisma init

Pull data from database

npx prisma db pull

Replace < password > and < projectname > with your MongoDB password and projectname

Screenshot 2024-01-21 at 11 08 27 PM
npx prisma generate

Run this command to generate Prisma Client

Go to http://localhost:3000 on your browser to view the result .

Environment Variables

Ensure to set the following environment variables:

DATABASE_URL: Put your Database URL here.

GOOGLE_CLIENT_ID: Put your Google Client ID here.

GOOGLE_CLIENT_SECRET: Put your Google Client Secret here.

NEXTAUTH_URL: Put your NextAuth URL here.

NEXTAUTH_SECRET: Put your NextAuth Secret here.

Features

  1. User Authentication : Seamless authentication via OAuth .

  2. User Management : Effortless management of user data stored on MongoDB .

  3. Responsive Design : Ensures optimal performance on various desktop screen sizes.

  4. Search Functionality: Case-insensitive search bar efficiently queries the underlying database .

  5. Content Management: Users can interact with the website and add items for sale.

  6. Database Integration: MongoDB enables secure and efficient data retrieval.

  7. API Integration: Integration with Google API Console for OAuth 2.0 .

Technologies Used

Client side

  1. Next.js
  2. TailwindCSS
  3. TypeScript
  4. DaisyUI

Server side

  1. Node.js
  2. Prisma
  3. TypeScript
  4. MongoDB
  5. NextAuth.js
  6. OAuth Google

Documentation

Next.js

TailwindCSS

TypeScript

MongoDB

DaisyUI

Node.js

Prisma

NextAuth.js

OAuth Google - https://developers.google.com/identity/protocols/oauth2

Feedback

For raising issues or contribution please connect through

  1. [email protected]
  2. [email protected]
  3. [email protected]
  4. [email protected]

Check Out Our Website

https://college-ecommerce.vercel.app/