The Student Exchange Platform is a web-based application designed to facilitate the exchange of goods and communication among students within a secure and user-friendly environment. The platform enables students to create accounts, manage their profiles, post and browse listings, and interact through a built-in messaging system. With features like profile picture management (including cropping and default avatars), responsive design, and real-time notifications, the platform aims to streamline student-to-student interactions and foster a trusted community for sharing resources.
A modern web application for students to exchange goods, communicate, and manage their profiles. Built with React and a Node.js/Express backend.
- User authentication (login, signup, JWT-based)
- Profile management with avatar upload, crop, and removal (default SVG avatar fallback)
- Browse and post listings
- Messaging system with unread message count
- Responsive design with modern UI components
- Footer and navbar with consistent branding
-
Clone the repository:
git clone <your-repo-url> cd project2
-
Install dependencies:
npm install # or yarn install -
Configure environment variables:
- If needed, create a
.envfile in the root directory for custom environment variables (e.g., backend API URL).
- If needed, create a
-
Start the development server:
npm start # or yarn startThe app will run at http://localhost:3000 by default.
npm start/yarn start— Start the development servernpm run build/yarn build— Build the app for productionnpm run lint/yarn lint— Lint the codebasenpm run test/yarn test— Run tests (if available)
project2/
├── public/ # Static assets
├── src/
│ ├── components/ # Reusable UI components (Footer, Layout, Navbar, etc.)
│ ├── pages/ # Page components (Login, Register, Profile, Browse, etc.)
│ ├── contexts/ # React context providers (AuthContext, DataContext)
│ ├── hooks/ # Custom React hooks
│ ├── App.jsx # Main app component
│ └── index.js # Entry point
├── package.json # Project metadata and scripts
├── README.md # Project documentation
└── ...
The backend is designed to work with a document-based database such as MongoDB.
Default local connection string:
mongodb://localhost:27017/userdb
Below is a typical schema structure:
username(String, unique): User's login namepasswordHash(String): Hashed passwordname(String): Full namebio(String): User bioavatar(String): Path or URL to profile picturecreatedAt(Date)
title(String): Listing titledescription(String): Details about the itemowner(String/ObjectId): Reference to userimages(Array of Strings): Image URLs/pathscreatedAt(Date)status(String): e.g., available, exchanged
participants(Array of Strings/ObjectIds): User referencesmessages(Array of Objects):sender(String/ObjectId)content(String)timestamp(Date)read(Boolean)
unreadCount(Number)
Note: Adjust field names/types as needed for your backend implementation (e.g., PostgreSQL, MySQL, etc.).
- The frontend expects a backend running at
http://localhost:4000by default. - Endpoints include
/login,/signup,/profile/:username,/conversations/:username, etc. - For avatar removal, the frontend sends a POST to
/profile/:usernamewithremoveAvatar=truein the form data. - Ensure CORS is enabled on the backend for local development.
- To change the backend API URL, update the fetch URLs in the React code or use an environment variable if supported.
- The default avatar is an inline SVG; you can replace it in
Profile.jsxandLayout.jsxif desired.
Pull requests and issues are welcome! Please follow standard code style and include clear commit messages.
For questions or issues, please open an issue in the repository or contact the maintainer.
© 2025 Student Exchange. All rights reserved.