Wibi is a peer-to-peer skill exchange platform based on the Time Banking system, enabling students to teach and learn skills through time-based credit transactions without monetary exchange.
The platform operates on a fundamental principle where time serves as the universal currency:
- 1 hour of teaching = 1 Time Credit
- 1 Time Credit = 1 hour of learning
- All skills are valued equally regardless of type or complexity
- Zero monetary transactions required
- Equity: Equal valuation of all skills and knowledge
- Community Building: Fosters peer-to-peer learning networks
- Accessibility: Removes financial barriers to skill acquisition
- Reciprocity: Encourages both teaching and learning behaviors
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS with shadcn/ui component library
- State Management: Zustand
- HTTP Client: Axios
- Date Utilities: date-fns
- UI Icons: Lucide React
- Real-time: WebSocket, WebRTC
- Testing: Jest, React Testing Library, Playwright
- Language: Go 1.25
- Web Framework: Gin
- ORM: GORM
- Authentication: JWT (JSON Web Tokens)
- Database: PostgreSQL 14+
- Architecture Pattern: Clean Architecture (MVC)
- API Documentation: Swagger/OpenAPI
- Security: Bcrypt, Rate Limiting, CORS, Input Sanitization
- Node.js 18 or higher
- Go 1.21 or higher
- PostgreSQL 14 or higher
- Git
# Navigate to backend directory
cd backend
# Install dependencies
go mod download
# Configure environment variables
cp .env.example .env
# Edit .env with your database credentials and JWT secret
# Run database migrations
go run cmd/server/main.go
# Start development server
go run cmd/server/main.go
# Server available at http://localhost:8080# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env.local
# Set NEXT_PUBLIC_API_URL to your backend URL
# Start development server
npm run dev
# Application available at http://localhost:3000- JWT-based authentication with token refresh
- User registration and email verification
- Profile management with avatar upload
- Password reset functionality
- Role-based access control (User/Admin)
- Browse and search skill catalog (17 pre-seeded skills)
- Filter by category (Academic, Technical, Creative, Language, Sports)
- Add teaching skills with experience level and hourly rate
- Create learning wishlist with priority levels
- View teacher profiles with ratings and reviews
- Request sessions from skill teachers
- Approve/reject session requests
- Schedule sessions (online/offline/hybrid modes)
- Real-time session status tracking
- Check-in system for both parties
- Mutual completion confirmation
- Session cancellation with reason tracking
- Dispute resolution system
- Time Credit balance tracking
- Credit hold mechanism during active sessions
- Automatic credit transfer upon session completion
- Comprehensive transaction history
- Peer-to-peer credit transfers
- Bonus credits for achievements and milestones
- Transaction rollback for cancelled sessions
- Rate teachers and students (1-5 stars)
- Detailed rating breakdown (Communication, Knowledge, Punctuality, Helpfulness)
- Written review comments
- Public rating summaries on profiles
- Review moderation and reporting
- Badge system with 4 types (Achievement, Milestone, Quality, Special)
- Automatic badge awarding based on criteria
- Badge pinning for profile display
- 5 leaderboards (Badges, Rarity, Sessions, Rating, Credits)
- Rarity levels (Common, Uncommon, Rare, Epic, Legendary)
- Bonus credit rewards for rare badges
- WebSocket notifications for instant updates
- WebRTC video calling for online sessions
- Collaborative whiteboard with real-time synchronization
- Live session status updates
- Forum with categories and threaded discussions
- Success story sharing with likes and comments
- Skill endorsements from peers
- User favorites list
- Session templates for recurring sessions
- User management dashboard
- Session monitoring and resolution
- Transaction oversight
- Content moderation
- Analytics and reporting
- Register and complete profile setup
- Add teaching skills with experience level and availability
- Receive session requests from students
- Review and approve/reject requests
- Conduct teaching sessions
- Confirm session completion
- Receive time credits and ratings
- Earn badges and climb leaderboards
- Register and complete profile setup
- Browse skill marketplace
- Review teacher profiles, ratings, and reviews
- Request session from preferred teacher
- Attend scheduled session
- Confirm session completion
- Rate and review teacher
- Spend earned credits on learning new skills
http://localhost:8080/api/v1
POST /auth/register Register new user
POST /auth/login User login
POST /auth/logout User logout
POST /auth/verify-email Verify email address
POST /auth/forgot-password Request password reset
POST /auth/reset-password Reset password
GET /auth/profile Get authenticated user profile
GET /user/profile Get user profile
PUT /user/profile Update user profile
POST /user/change-password Change password
POST /user/avatar Upload avatar
GET /user/stats Get user statistics
GET /skills List all skills
GET /skills/:id Get skill details
POST /user/skills Add teaching skill
GET /user/skills Get user's teaching skills
PUT /user/skills/:id Update teaching skill
DELETE /user/skills/:id Remove teaching skill
POST /user/learning-skills Add learning skill
GET /user/learning-skills Get learning wishlist
DELETE /user/learning-skills/:id Remove learning skill
POST /sessions Create session request
GET /sessions List user sessions
GET /sessions/:id Get session details
POST /sessions/:id/approve Approve session request
POST /sessions/:id/reject Reject session request
POST /sessions/:id/checkin Check in to session
POST /sessions/:id/start Start session
POST /sessions/:id/complete Confirm completion
POST /sessions/:id/cancel Cancel session
POST /sessions/:id/dispute Dispute session
GET /user/transactions Get transaction history
GET /user/transactions/:id Get transaction details
POST /user/transfer Transfer credits to another user
POST /reviews Create review
GET /reviews/:id Get review details
PUT /reviews/:id Update review
DELETE /reviews/:id Delete review
GET /users/:id/reviews Get user reviews
GET /users/:id/rating-summary Get rating summary
GET /badges List all badges
GET /user/badges Get user badges
POST /user/badges/check Check and award badges
POST /user/badges/:id/pin Pin badge to profile
GET /leaderboard/badges Badge leaderboard
GET /leaderboard/rarity Rarity leaderboard
GET /leaderboard/sessions Session leaderboard
GET /leaderboard/rating Rating leaderboard
GET /leaderboard/credits Credit leaderboard
GET /notifications Get notifications
GET /notifications/unread Get unread notifications
GET /notifications/unread/count Get unread count
PUT /notifications/:id/read Mark as read
PUT /notifications/read-all Mark all as read
DELETE /notifications/:id Delete notification
WS /ws/notifications Real-time notifications
WS /ws/whiteboard/:sessionId Collaborative whiteboard
WS /ws/video/:sessionId WebRTC signaling
For complete API documentation, visit /api/v1/swagger when the server is running.
The application uses PostgreSQL with 19 tables organized into the following domains:
- users: User accounts and profiles
- admins: Administrative accounts
- used_tokens: JWT token blacklist
- skills: Master skill catalog
- user_skills: Skills users can teach
- learning_skills: Skills users want to learn
- skill_progress: Learning progress tracking
- sessions: Teaching/learning sessions
- transactions: Credit transaction history
- video_sessions: Video call metadata
- reviews: Ratings and feedback
- favorites: Favorite teachers
- notifications: Real-time notifications
- endorsements: Peer endorsements
- forum_threads: Discussion threads
- forum_comments: Thread comments
- stories: Success stories
- story_comments: Story comments
- badges: Achievement badges
- user_badges: Badges earned by users
- shared_files: Session materials
- whiteboards: Collaborative whiteboard data
- templates: Session templates
- reports: User reports
- availabilities: Teacher availability schedules
- Frontend: Vercel (Free tier)
- Backend: Render (Free tier)
- Database: Supabase PostgreSQL (Free tier)
Backend (.env):
PORT=8080
GIN_MODE=release
DB_HOST=your-database-host
DB_PORT=5432
DB_USER=your-database-user
DB_PASSWORD=your-database-password
DB_NAME=your-database-name
DB_SSLMODE=require
JWT_SECRET=your-jwt-secret-min-32-chars
JWT_EXPIRY=168h
ALLOWED_ORIGINS=https://your-frontend-domain.com
Frontend (.env.local):
NEXT_PUBLIC_API_URL=https://your-backend-domain.com
For detailed deployment instructions, see DEPLOYMENT.md.
cd backend
go test ./...
go test -cover ./...cd frontend
npm run test
npm run test:coverage- Connection pooling (10 idle, 100 max connections)
- Materialized views for leaderboards (auto-refresh every 10 minutes)
- Composite database indexes for common queries
- GORM query optimization with preloading
- Rate limiting (100 requests/minute per IP)
- GZIP compression for responses
- Next.js App Router with Server Components
- Image optimization with next/image
- Code splitting with dynamic imports
- Edge caching via Vercel CDN
- Zustand for lightweight state management (3KB)
- PWA support with service workers
- JWT authentication with token expiry and refresh
- Bcrypt password hashing (cost factor: 10)
- SQL injection prevention via parameterized queries
- XSS protection with HTML sanitization (Bluemonday)
- CSRF protection
- Rate limiting per IP address
- CORS whitelist configuration
- Input validation and sanitization
- HTTPS enforcement
- Security headers middleware
Contributions are welcome. Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Commit changes with clear messages
- Write tests for new features
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License. See LICENSE file for details.
Zidane Abiansyah
Built with modern web technologies and best practices in software architecture.