A comprehensive community well-being platform that connects like-minded individuals through events, communities, journaling, and meaningful interactions. Built with React and Express.js, featuring a robust backend API with database integration.
- User Authentication & Onboarding: Complete sign-up flow with personalized onboarding
- Events Management: Discover, filter, and RSVP to community events
- Communities: Join interest-based communities with group chat functionality
- Journaling: Voice and text journaling with AI-powered insights
- Direct Messaging: One-on-one messaging between connected users
- User Profiles: Comprehensive profiles with badges, achievements, and activity history
- Recommendations: AI-powered personalized recommendations for events and communities
- Monthly Reports: Detailed analytics and insights about user activity
- Gamification: Points, levels, badges, and streaks to encourage engagement
- Real-time Chat: Group chat with polls, event proposals, and announcements
- Community Creation: Users can create and manage their own communities
- Connection System: Send connection requests and build your network
- Search: Dynamic search for users, events, and communities
- AI Integration: OpenAI-powered transcription and chat assistance
- Event Posting: Create and manage events with reviews and RSVPs
- Framework: React 18 with React Router v6
- Styling: Tailwind CSS with custom animations
- State Management: React Context API (Auth, User, Events, Chat, etc.)
- Build Tool: Vite
- UI Components: Custom component library with reusable components
- Framework: Express.js
- Database: Backend data tables for persistent storage
- API: RESTful API with comprehensive endpoints
- AI Integration: OpenAI API for transcription and chat features
- File Upload: Multer for handling audio file uploads
community-wellbeing-app/
├── backend/
│ ├── server.js # Express server with API endpoints
│ ├── data/ # Database tables (users, events, communities, etc.)
│ ├── prompts.js # AI system prompts
│ └── uploads/ # Temporary file storage
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── auth/ # Authentication components
│ │ ├── common/ # Common UI components
│ │ ├── components/ # Feature-specific components
│ │ │ ├── communities/ # Community-related components
│ │ │ ├── events/ # Event-related components
│ │ │ ├── journal/ # Journal components
│ │ │ └── profile/ # Profile components
│ │ └── gamification/ # Gamification components
│ ├── context/ # React Context providers
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ ├── services/ # API service layer
│ ├── styles/ # Global styles and CSS
│ └── utils/ # Utility functions
└── public/ # Static assets
- Node.js 18+ and npm
- Backend server running on port 5001
- OpenAI API key (optional, for AI features)
- Clone the repository
git clone <repository-url>
cd community-wellbeing-app- Install frontend dependencies
npm install- Install backend dependencies
cd backend
npm install- Set up environment variables
Create a .env file in the backend directory:
PORT=5001
OPENAI_API_KEY=your_openai_api_key_here # Optional- Start the backend server
cd backend
npm start- Start the frontend development server
npm run devThe application will be available at http://localhost:3001 (or the port specified by Vite).
POST /api/users- Create or update user accountGET /api/users/:id- Get user by IDGET /api/users/search- Search users
GET /api/events- Get all events (with filtering)GET /api/events/:id- Get event detailsPOST /api/events- Create new eventPOST /api/events/:id/rsvp- RSVP to event
GET /api/communities- Get all communitiesGET /api/communities/:id- Get community detailsPOST /api/communities- Create new communityPOST /api/communities/:id/join- Join communityPOST /api/communities/:id/invite- Invite users to community
GET /api/communities/:id/messages- Get community messagesPOST /api/communities/:id/messages- Send messagePOST /api/communities/:id/messages/:messageId/vote- Vote on poll
GET /api/connections/status- Get connection statusPOST /api/connections/request- Send connection requestGET /api/connections/:userId- Get user connections
POST /api/transcribe- Transcribe audio filePOST /api/ask- AI chat assistance
- LandingPage: Welcome page with sign-up/sign-in options
- DashboardPage: Main dashboard with recommendations and quick actions
- EventsPage: Browse and filter events
- CommunitiesPage: Discover and join communities
- JournalPage: Voice and text journaling interface
- ProfilePage: User profile with stats and activity
- OnboardingPage: Multi-step onboarding flow
- AuthContext: User authentication and session management
- UserContext: User profile and preferences
- EventContext: Event data and RSVP management
- ChatContext: Chat messages and real-time updates
- GamificationContext: Points, levels, and achievements
All API interactions are handled through service layers:
api.js- Base API client with error handlingauthService.js- Authentication operationseventService.js- Event managementcommunityService.js- Community operationschatService.js- Chat functionalityuserService.js- User profile management
The backend uses data tables to store:
- User profiles with interests, preferences, and activity history
- Authentication credentials
- Joined communities and connections
- Points, level, and achievements
- Event details (title, description, date, location)
- Category, time preferences, and age groups
- Organizer information and RSVP data
- Community information (name, description, interests)
- Member count and verification status
- Creator and admin information
- Chat messages with community association
- Message types (text, poll, announcement, event proposal)
- Timestamps and user associations
- User connections and friend relationships
- Connection request status
- Connection history
- User signs up with email and basic information
- Completes onboarding with interests and preferences
- User data is stored in the backend database
- Session is maintained via localStorage
- Protected routes require authentication
- Real-time group messaging
- Poll creation and voting
- Event proposals
- System announcements
- Conversation flows triggered by "hello" messages
- Advanced filtering (category, date, location, age group)
- Personalized recommendations based on user interests
- RSVP functionality with notifications
- Event reviews and ratings
- Post-event feedback
- Voice recording with transcription
- Text journal entries
- AI-powered insights and recommendations
- Mood tracking and history
- Monthly activity summaries
- Points earned for various activities
- Level progression system
- Badges and achievements
- Streak tracking
- Leaderboard (future feature)
- Create API endpoint in
backend/server.js - Create service in
src/services/ - Create components in appropriate
src/components/directory - Add route in
src/router.jsx - Update context if needed for state management
- Use functional components with hooks
- Follow React best practices
- Use Tailwind CSS for styling
- Maintain consistent naming conventions
PORT=5001
OPENAI_API_KEY=your_key_here # OptionalConfigured via Vite environment variables:
VITE_API_URL- Backend API URL (defaults to http://localhost:5001/api)
The application includes comprehensive error handling and validation:
- Form validation for user inputs
- API error handling with user-friendly messages
- Protected route authentication checks
- Data validation on backend endpoints
# Build frontend
npm run build
# The built files will be in the `dist/` directory- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License
Built with React, Express.js, Tailwind CSS, and OpenAI API.
For detailed API documentation, see the inline comments in backend/server.js.