4
5 - Menambahkan pagination pada endpoint GET /api/mobile/donation
6 - Menambahkan pagination pada endpoint GET /api/mobile/donation/[id]/news
7 - Menambahkan pagination pada endpoint GET /api/mobile/donation/[id]/donatur
8 - Memperbaiki validasi payload pada endpoint POST /api/mobile/auth/device-tokens
9 - Menangani struktur payload yang bersarang dan langsung pada device token endpoint
10 - Menambahkan informasi pagination ke dalam respons API
### NO Issue
5.8 KiB
5.8 KiB
HIPMI Project - QWEN.md
Project Overview
HIPMI (Himpunan Pengusaha Muya Indonesia) is a comprehensive Next.js-based web application built for the Indonesian Young Entrepreneurs Association. The project is a sophisticated platform that provides multiple business functionalities including investment management, donations, events, job listings, forums, voting systems, and collaborative projects.
Key Technologies
- Framework: Next.js 13+ (with App Router)
- Language: TypeScript
- Database: PostgreSQL with Prisma ORM
- Styling: Tailwind CSS with Mantine UI components
- Authentication: JWT-based with custom middleware
- Runtime: Bun (instead of Node.js)
- Deployment: Standalone output configuration
Team Structure
- bagas: Frontend, DevOps
- lukman: Frontend, UI
- lia: Backend, Frontend, QC
- malik: Leader
Architecture & Features
Core Modules
The application is organized into several major functional areas:
- Authentication System (
/auth) - Login, registration, validation - Investment Platform (
/investasi) - Investment creation, trading, portfolio management - Donation System (
/donasi) - Fundraising campaigns, donation processing - Event Management (
/event) - Event creation, participation, management - Voting System (
/vote) - Voting creation and participation - Job Board (
/job) - Job posting and application system - Forum (
/forum) - Discussion platform with reporting features - Collaboration Platform (
/colab) - Project collaboration tools - User Profiles (
/profile) - User profile management - Business Maps (
/maps) - Business location mapping
Admin Panel
The application includes a comprehensive admin panel (/admin) with modules for managing:
- Investment approvals and transfers
- Donation campaign reviews
- Event management
- Forum moderation
- Job posting reviews
- User access management
- Voting oversight
Technical Architecture
Routing & Authentication
- Custom middleware handles authentication and authorization
- Public routes are defined in the middleware configuration
- JWT tokens are stored in cookies with secure options
- Role-based access control (MasterUserRole model)
Database Schema
The Prisma schema defines a comprehensive data model with:
- User management with roles and profiles
- Investment and financial systems
- Donation and crowdfunding features
- Event management
- Forum and discussion systems
- Collaboration platforms
- Notification systems
- Business mapping features
Environment Configuration
The application uses multiple environment files for different deployment stages:
- Development:
run.env.dev,run.env.local.dev - Build:
run.env.build.dev,run.env.build.local - Runtime:
run.env.start.dev,run.env.start.local
Building and Running
Prerequisites
- Bun runtime installed
- PostgreSQL database
- Required environment variables configured
Setup Commands
# Install dependencies
bun install
# Setup database (Prisma)
bun prisma generate
bun prisma db push
bun prisma db seed
# Development server
bun run dev
# Build for production
bun run build
# Start production server
bun run start
Development Scripts
dev: Starts development server with HTTPSbuild: Builds the application for productionstart: Starts the production serverlint: Runs Next.js lintingver: Creates version tags
Development Conventions
Git Workflow
The team follows a structured Git workflow:
- Check status with
git status - Add specific files with
git add <file>(avoidgit add -A) - Commit with structured messages following conventional commits:
feat: New featuresfix: Bug fixesdocs: Documentation updateschore: Routine tasksrefactor: Code restructuringtest: Testing additionsstyle: Styling changesperf: Performance improvements
Code Standards
- TypeScript with strict mode enabled
- Component header comments with file description, creator, date
- Function comments with parameter and return value descriptions
- Custom type interface comments
- Error handling comments
- Complex logic comments
Commit Message Format
type: Short description
Body:
- Detailed description of changes
- Motivation for changes
- Breaking changes if any
References: #issue-number
Project Structure
Main Directories
src/app: Next.js App Router pages and layoutssrc/app_modules: Reusable application modulessrc/lib: Shared libraries and utilitiessrc/util: Utility functionsprisma: Database schema and migrationspublic: Static assetscertificates,logs: Application data directories
Key Files
package.json: Dependencies and scriptsnext.config.js: Next.js configurationmiddleware.tsx: Authentication and routing middlewaretsconfig.json: TypeScript configurationtailwind.config.js: Styling configurationgen_page.tsx: Generated page routing utilityprisma/schema.prisma: Database schema definition
Special Features
Real-time Capabilities
- WebSocket integration for real-time updates
- MQTT support for messaging
- Live notifications system
Payment Integration
- Midtrans payment gateway for investments
- Multiple payment methods
- Invoice generation and tracking
File Handling
- PDF generation and viewing
- Image processing and storage
- Document management for investments
Mobile Support
- Responsive design
- Mobile-specific features
- Device token management
Security Measures
Authentication
- JWT-based authentication
- Session management
- Role-based access control
- Secure token storage in cookies
Input Validation
- Prisma schema validations
- Server-side validation
- Sanitization of user inputs
Data Protection
- Encrypted tokens
- Secure API routes
- Proper CORS configuration