Campus Exchange is a lightweight and fast web application for college students to buy, sell, and exchange items like textbooks, gadgets, and other essentials. The platform leverages the speed and scalability of Cloudflare Workers, React, and Tailwind CSS.
- User Authentication: Secure login and signup using JWT.
- Product Listings: Add, edit, and delete personal product listings.
- Search & Filter: Search for items by name, category, or price range.
- Categories: Organize products into categories like books, electronics, etc.
- Image Uploads: Enhance listings with product images.
- Cloudflare Hosting: Lightning-fast performance with serverless backend and CDN.
- Responsive Design: Fully optimized for mobile, tablet, and desktop.
- React.js
- Tailwind CSS
- React Router
- Axios for API requests
- Hono - A lightweight web framework for Cloudflare Workers
- Cloudflare Workers (Serverless Backend)
- Frontend: Cloudflare Pages
- Backend: Cloudflare Workers
Check out the live demo: Campus Exchange
(campusexchange.pages.dev)
- Node.js installed
- Cloudflare account (optional for local development)
bash git clone https://github.com/Sushantjarial/Campus-Exchange.git cd Campus-Exchange
-
Navigate to the
frontenddirectory: bash cd client -
Install dependencies: bash npm install
-
Start the development server: bash npm start
-
Visit the app at
http://localhost:3000.
-
Navigate to the
backenddirectory: bash cd server -
Install dependencies: bash npm install
-
Start the local development server for Cloudflare Workers: bash npm run dev
-
Deploy the backend to Cloudflare Workers: bash npm run deploy
campus-exchange/ ├── frontend/ │ ├── src/ │ │ ├── components/ │ │ ├── pages/ │ │ ├── App.js │ │ └── index.js │ ├── public/ │ └── package.json ├── backend/ │ ├── src/ │ │ ├── handlers/ │ │ ├── routes/ │ │ ├── index.ts │ └── package.json ├── README.md └── .env
| Endpoint | Method | Description |
|---|---|---|
/auth/signup |
POST | User registration |
/auth/login |
POST | User login |
/products/listings |
GET | Get all product listings |
/products/myListings |
GET | Get user's own listings |
/products/add |
POST | Add a new product listing |
/products/delete/:id |
DELETE | Delete a product listing |
/products/search?query={text} |
GET | Search for products |
-
Build the frontend: bash npm run build
-
Deploy the
frontendbuild folder to Cloudflare Pages via your Cloudflare dashboard.
- Navigate to the
backenddirectory. - Deploy the backend to Cloudflare Workers: bash npm run deploy
- Add payment integration for secure transactions.
- Push notifications for messages or offers.
- Product recommendations using AI/ML.
- User reviews and ratings.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name. - Commit your changes:
git commit -m 'Add feature-name'. - Push to the branch:
git push origin feature-name. - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any queries, feel free to reach out:
-
Name: Rohit Somvanshi
-
Email: [email protected]
-
GitHub: My GitHub Profile
-
- Name: Amrit Kumar
-
Email: [email protected]
-
GitHub: My GitHub Profile
-
- Name: Sushant Jarial
-
Email:
-
GitHub: My GitHub Profile
-
Name: Wasim Khan
-
Email:
-
GitHub: My GitHub Profile