Skip to content

Ananya020/HelpBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HelpBoard - Neighborhood Sharing Platform

Brand font

A full-stack web application that enables neighbors to share, borrow, lend, and donate items within their community. Built with Next.js frontend and Spring Boot backend.

๐ŸŒŸ Features

Core Functionality

  • Item Management: Add, view, and manage items you want to share
  • Request System: Request items from neighbors or approve/reject incoming requests
  • Real-time Chat: Communicate with other users about item requests
  • User Authentication: Secure login and registration system
  • Dashboard: Personal dashboard to manage your items and requests

Item Types

  • Borrow: Items you can borrow from others
  • Lend: Items you're willing to lend to others
  • Donate: Items you want to give away

Request Management

  • My Requests: Track requests you've made to others
  • Requests Received: Manage requests from other users
  • Status Updates: Approve, reject, or track request status
  • Real-time Notifications: Stay updated on request changes

Demo Video

๐Ÿ—๏ธ Tech Stack

Frontend

  • Framework: Next.js 14.2.16
  • Language: TypeScript
  • Styling: Tailwind CSS
  • State Management: Zustand
  • UI Components: Radix UI + Custom components
  • Forms: React Hook Form + Zod validation
  • Real-time: STOMP WebSocket client
  • HTTP Client: Axios
  • Notifications: React Hot Toast

Backend

  • Framework: Spring Boot 3.x
  • Language: Java 17+
  • Database: MySQL
  • ORM: JPA/Hibernate
  • Security: Spring Security + JWT
  • WebSocket: STOMP messaging
  • Validation: Jakarta Validation
  • Documentation: OpenAPI/Swagger (planned)

๐Ÿ“ Project Structure

helpboard/
โ”œโ”€โ”€ helpboard-frontend/          # Next.js frontend
โ”‚   โ”œโ”€โ”€ app/                     # App router pages
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/           # User dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ items/[itemId]/      # Item detail pages
โ”‚   โ”‚   โ”œโ”€โ”€ chat/[requestId]/    # Chat pages
โ”‚   โ”‚   โ”œโ”€โ”€ login/               # Authentication pages
โ”‚   โ”‚   โ””โ”€โ”€ register/
โ”‚   โ”œโ”€โ”€ components/              # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ forms/               # Form components
โ”‚   โ”‚   โ”œโ”€โ”€ ui/                  # UI component library
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ lib/                     # Utilities and API client
โ”‚   โ”œโ”€โ”€ store/                   # Zustand state management
โ”‚   โ””โ”€โ”€ styles/                  # Global styles
โ”œโ”€โ”€ helpboard-backend/           # Spring Boot backend
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ com/helpboard/backend/
โ”‚   โ”‚       โ”œโ”€โ”€ config/          # Configuration classes
โ”‚   โ”‚       โ”œโ”€โ”€ controller/      # REST controllers
โ”‚   โ”‚       โ”œโ”€โ”€ dto/             # Data Transfer Objects
โ”‚   โ”‚       โ”œโ”€โ”€ model/           # JPA entities
โ”‚   โ”‚       โ”œโ”€โ”€ repository/      # Data repositories
โ”‚   โ”‚       โ”œโ”€โ”€ service/         # Business logic
โ”‚   โ”‚       โ””โ”€โ”€ util/            # Utility classes
โ”‚   โ””โ”€โ”€ src/main/resources/
โ”‚       โ””โ”€โ”€ application.properties
โ””โ”€โ”€ README.md

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • Java 17+
  • MySQL 8.0+
  • Maven 3.6+

Installation

  1. Clone the repository

    git clone <repository-url>
    cd helpboard
  2. Backend Setup

    cd helpboard-backend
    
    # Create MySQL database
    mysql -u root -p
    CREATE DATABASE helpboarddb;
    
    # Update application.properties with your database credentials
    # Edit: src/main/resources/application.properties
    
    # Run the backend
    mvn spring-boot:run

    Backend will be available at http://localhost:8080

  3. Frontend Setup

    cd helpboard-frontend
    
    # Install dependencies
    npm install
    # or
    yarn install
    # or
    pnpm install
    
    # Start development server
    npm run dev
    # or
    yarn dev
    # or
    pnpm dev

    Frontend will be available at http://localhost:3000

Configuration

Backend Configuration

Update helpboard-backend/src/main/resources/application.properties:

# Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/helpboarddb?useSSL=false&serverTimezone=UTC
spring.datasource.username=your_username
spring.datasource.password=your_password

# JWT Configuration
jwt.secret=your-super-secret-jwt-key-replace-this-in-prod-with-a-strong-random-string-at-least-256bit
jwt.expirationMs=3600000

# Server Port
server.port=8080

Frontend Configuration

Update helpboard-frontend/lib/api.ts if needed:

const API_BASE_URL = "http://localhost:8080" // Backend URL

๐Ÿ“ฑ Usage

For Users

  1. Register/Login: Create an account or sign in
  2. Add Items: Use the dashboard to add items you want to share
  3. Browse Items: View available items from other users
  4. Make Requests: Request items you're interested in
  5. Manage Requests: Approve/reject requests for your items
  6. Chat: Communicate with other users about requests

For Developers

API Endpoints

Authentication

  • POST /auth/login - User login
  • POST /auth/register - User registration

Items

  • GET /items - Get all items
  • POST /items - Create new item
  • GET /items/{id} - Get item by ID
  • PUT /items/{id} - Update item
  • DELETE /items/{id} - Delete item

Requests

  • POST /items/{itemId}/request - Create request for item
  • GET /users/{userId}/requests - Get user requests
  • PATCH /requests/{id}/status - Update request status

Chat

  • GET /requests/{id}/messages - Get chat messages
  • POST /requests/{id}/messages - Send message

WebSocket Endpoints

  • /topic/requests/{requestId} - Chat messages
  • /app/requests/{requestId}/send - Send message

๐Ÿ”ง Development

Running Tests

# Backend tests
cd helpboard-backend
mvn test

# Frontend tests (if configured)
cd helpboard-frontend
npm test

Building for Production

# Backend
cd helpboard-backend
mvn clean package
java -jar target/helpboard-backend-*.jar

# Frontend
cd helpboard-frontend
npm run build
npm start

Code Style

  • Frontend: ESLint + Prettier (configured)
  • Backend: Follow Spring Boot conventions
  • Git: Conventional commits recommended

๐Ÿ—„๏ธ Database Schema

Key Entities

  • User: User accounts and profiles
  • Item: Items available for sharing
  • Request: Item requests between users
  • Message: Chat messages for requests

Relationships

  • User โ†’ Items (One-to-Many)
  • User โ†’ Requests (One-to-Many as requester)
  • Item โ†’ Requests (One-to-Many)
  • Request โ†’ Messages (One-to-Many)

๐Ÿ”’ Security

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: BCrypt password encryption
  • CORS Configuration: Cross-origin request handling
  • Input Validation: Server-side validation for all inputs
  • SQL Injection Protection: JPA/Hibernate parameterized queries

๐Ÿš€ Deployment

Backend Deployment

  1. Build the JAR file: mvn clean package
  2. Deploy to your preferred Java hosting platform
  3. Configure environment variables for database and JWT secret
  4. Set up MySQL database

Frontend Deployment

  1. Build the application: npm run build
  2. Deploy to Vercel, Netlify, or your preferred hosting platform
  3. Configure environment variables for API endpoints

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ› Known Issues

  • WebSocket connection may need reconnection logic
  • Image upload functionality not yet implemented
  • Email notifications not configured
  • Search and filtering for items needs enhancement

๐Ÿ”ฎ Future Enhancements

  • Mobile app (React Native)
  • Push notifications
  • Image upload and management
  • Advanced search and filtering
  • Rating and review system
  • Location-based item discovery
  • Email notifications
  • Admin dashboard
  • Analytics and reporting

ScreenShots

ss1

ss2

ss3

ss4

ss5

SpringBoot Terminal Logs Screenshot

spring logs

๐Ÿ“ž Support

If you have any questions or need help, please:

  1. Check the Issues page
  2. Create a new issue with detailed description
  3. Contact the development team

๐Ÿ™ Acknowledgments

  • Spring Boot team for the excellent framework
  • Next.js team for the amazing React framework
  • Radix UI for accessible component primitives
  • Tailwind CSS for utility-first styling
  • All contributors and testers (MY DEAREST AI COMPANIONS WHO HELPED ME DEBUG THE CODE FOR 5+ HOURS)

Happy Sharing! ๐ŸŽ‰

About

A full-stack web application that enables neighbors to share, borrow, lend, and donate items within their community. Built with Next.js frontend and Spring Boot backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors