Skip to content

marshiieann4-svg/ConnectLocal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 ConnectLocal - Community Help Platform

A community-driven platform connecting verified helpers with people who need assistance in Mbombela's rural areas and beyond.

Status: βœ… READY FOR DEPLOYMENT
Last Updated: March 9, 2026


🎯 Project Overview

ConnectLocal is a comprehensive community platform that enables:

  • Individual helpers to offer and commercialize their skills
  • Organizations (NGOs, care centers) to manage clients and services
  • Requesters to find verified, trustworthy help
  • Community members to build their reputation through gamification

Key Features

βœ… User Management

  • Phone-based registration and login
  • Individual and Organization accounts
  • Role-based access control
  • Profile verification levels

βœ… Messaging System

  • Real-time chat between users
  • HTTP + WebSocket dual-delivery (reliable & fast)
  • Unread message counts
  • Typing indicators
  • Message history

βœ… Service Management

  • Post and browse services
  • Search and filter
  • Service details and booking
  • Ratings and reviews

βœ… Gamification

  • Community points system
  • Achievement badges
  • Leaderboard
  • Experience levels

βœ… Safety & Verification

  • Safety check-ins
  • ID verification framework
  • Verification levels (0-3)
  • Safety log records

βœ… Admin Portal

  • User management
  • Service moderation
  • Statistics and analytics
  • Admin dashboard

βœ… Modern UI/UX

  • Minimal monotone design (black/white/gray)
  • Collapsible sidebar navigation
  • Mobile-responsive layout
  • Bootstrap styling
  • Icon-based interface

πŸš€ Quick Start

Prerequisites

  • Node.js v18+
  • npm or yarn
  • MongoDB Atlas account (configured)
  • Modern web browser

Installation & Running

# Install dependencies
cd backend && npm install
cd ../frontend && npm install

# Start servers (in separate terminals)

# Terminal 1: Backend
cd backend
npm run dev
# Backend runs on http://localhost:5000

# Terminal 2: Frontend
cd frontend
npm run dev
# Frontend runs on http://localhost:5173

Access: Open http://localhost:5173 in your browser

First Time

  1. Click Register
  2. Fill in required fields (Name, Phone, Ward)
  3. Choose account type (Individual/Organization)
  4. Click Register (auto-login)
  5. Explore the dashboard!

See QUICKSTART.md for detailed guide.


πŸ“ Project Structure

ConnectLocal/
β”œβ”€β”€ backend/                 # Node.js + Express server
β”‚   β”œβ”€β”€ controllers/        # Business logic
β”‚   β”œβ”€β”€ models/            # MongoDB schemas
β”‚   β”œβ”€β”€ routes/            # API endpoints
β”‚   β”œβ”€β”€ middleware/        # Auth, validation, etc.
β”‚   β”œβ”€β”€ config/            # Database connection
β”‚   β”œβ”€β”€ utils/             # Helper functions
β”‚   └── server.js          # Main server file
β”‚
β”œβ”€β”€ frontend/              # React + Vite client
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/   # Reusable React components
β”‚   β”‚   β”œβ”€β”€ pages/        # Full page components
β”‚   β”‚   β”œβ”€β”€ services/     # API client (axios)
β”‚   β”‚   β”œβ”€β”€ context/      # Socket.IO context
β”‚   β”‚   β”œβ”€β”€ utils/        # Helper functions
β”‚   β”‚   β”œβ”€β”€ App.jsx       # Main app component
β”‚   β”‚   └── main.jsx      # Entry point
β”‚   └── dist/             # Production build
β”‚
β”œβ”€β”€ docs/                 # Documentation
β”œβ”€β”€ DEPLOYMENT.md         # Production deployment guide
β”œβ”€β”€ PRODUCTION.md         # Production environment config
β”œβ”€β”€ QUICKSTART.md         # Quick start guide
└── README.md            # This file

πŸ”§ Technology Stack

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB with Atlas
  • Authentication: JWT tokens
  • Real-time: Socket.IO
  • Security: Helmet.js, CORS, Rate limiting
  • Validation: Custom middleware

Frontend

  • Library: React 18+
  • Build Tool: Vite
  • Routing: React Router
  • HTTP Client: Axios
  • Real-time: Socket.IO client
  • UI Framework: Bootstrap 5
  • Icons: Font Awesome

πŸ“Š API Endpoints

Authentication

POST   /api/auth/register      Register new user
POST   /api/auth/login         Login with phone
GET    /api/auth/me            Get current user (protected)

Users

GET    /api/users/profile      Get own profile (protected)
GET    /api/users/:id          Get user by ID
PUT    /api/users/profile      Update profile (protected)

Services

GET    /api/services           List all services
POST   /api/services           Create service (protected)
GET    /api/services/:id       Get service details
PUT    /api/services/:id       Update service (protected)
DELETE /api/services/:id       Delete service (protected)

Messages

POST   /api/messages/conversations           Create conversation
GET    /api/messages/conversations           List conversations
POST   /api/messages/conversations/:id/messages     Send message
POST   /api/messages/conversations/:id/read         Mark as read

Ratings

GET    /api/ratings/user/:id   Get user ratings
POST   /api/ratings            Create rating (protected)

Gamification

GET    /api/gamification/user/:id      Get points & badges
GET    /api/gamification/leaderboard   Get top users

See API documentation for full endpoint list.


πŸ§ͺ Testing

All major features have been tested:

  • βœ… User registration and login
  • βœ… Profile creation and editing
  • βœ… Messaging between users
  • βœ… Real-time notifications
  • βœ… Service listing and details
  • βœ… Rating system
  • βœ… Sidebar navigation
  • βœ… Mobile responsiveness
  • βœ… Error handling

See DEPLOYMENT.md for full testing checklist.


πŸš€ Deployment

Development

npm run dev

Production Build

# Backend
cd backend
npm install --production
NODE_ENV=production npm start

# Frontend  
cd frontend
npm run build
# Serve /dist folder via web server

For detailed deployment instructions, see:


πŸ“ Features & Status

Feature Status Notes
User Registration βœ… Working Phone-based, multiple account types
Login βœ… Working Phone + JWT tokens
Messaging βœ… Working HTTP + WebSocket, real-time
Profiles βœ… Working Editable bio and skills
Services βœ… Working CRUD operations
Ratings βœ… Working Store and display ratings
Verification βœ… Working ID, police, verification levels
Gamification βœ… Working Points, badges, leaderboard
Admin Panel βœ… Working Manage users and content
Safety βœ… Working Check-ins and logging
Mobile UI βœ… Working Responsive design, sidebar menu

πŸ”’ Security

  • βœ… HTTPS ready
  • βœ… JWT authentication
  • βœ… CORS configured
  • βœ… Rate limiting (1000 req/min for dev)
  • βœ… Input validation
  • βœ… XSS protection via React
  • βœ… Helmet.js security headers
  • βœ… MongoDB connection over TLS

Production Recommendations:

  • Update JWT_SECRET to strong random value
  • Enable HTTPS only
  • Reduce rate limits to 500 req/min
  • Set up monitoring and logging
  • Configure backups and failover

πŸ› Known Issues & Limitations

  • Phone-only authentication (password-based auth not yet implemented)
  • Email verification not yet implemented
  • No automated SMS sending (ready for integration)
  • Limited mobile app optimization
  • No payment processing yet

🎯 Future Enhancements

  • Password-based authentication option
  • Email verification and password reset
  • Push notifications
  • Advanced search and filters
  • Image compression for uploads
  • Mobile app (React Native)
  • Analytics dashboard
  • Payment processing
  • Multi-language support
  • Offline mode (PWA)

πŸ‘₯ Contributing

To contribute to ConnectLocal:

  1. Clone the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“ž Support & Troubleshooting

Common Issues

Can't register?

  • Check all required fields are filled
  • Verify phone number doesn't already exist
  • Check browser console for error messages

Messages not working?

  • Ensure both servers are running
  • Check Socket.IO connection in DevTools
  • Try refreshing the page

Profile not saving?

  • Verify you're logged in
  • Check console for API errors
  • Ensure all required fields are filled

Rate limit errors (429)?

  • Already fixed! Limit is generous for development
  • For stricter limit, adjust in .env

See QUICKSTART.md for more troubleshooting.


πŸ“„ License

Copyright Β© 2026 ConnectLocal. All rights reserved.


πŸŽ‰ Ready to Deploy!

All features are functional and tested. See DEPLOYMENT.md for production deployment steps.

Last Updated: March 9, 2026 Status: βœ… Production Ready

About

Community help platform connecting verified helpers with people who need assistance in Mbombela's rural areas. Features verification, USSD, safety check-ins, NGO portal, and gamification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors