Entrepreneurship, Incubators, and Technical Development Center - Misurata
Affiliated with Misurata College of Industrial Technology
Production-Ready | Bilingual (AR/EN) | Cost-Optimized | Secure
- 100% deployment-ready for Linux VPS with Docker, Nginx, and Let's Encrypt SSL.
- Comprehensive deployment documentation & system specifications.
- Production secrets generated and secured.
- 40% infrastructure cost reduction achieved through optimized stack.
- 97% storage cost savings - S3 migration complete (AWS/Cloudflare R2/MinIO).
- High Performance - Redis caching + BullMQ queues for async jobs.
- Enterprise-grade security - NextAuth + robust RBAC with automated integrity verification.
- Professional UX - Multi-page forms with validation, persistence, and RTL/LTR layout.
- Bilingual platform - Full Arabic (RTL) / English (LTR) support via
next-intl.
- System Architecture
- Features
- Tech Stack
- Getting Started (Docker + Manual)
- Environment Variables
- Database Seeding
- Production Deployment
- License
Internet (HTTPS :443)
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Nginx Reverse Proxy (SSL Termination) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Docker Compose (app-network) β
β β
β βββββββββββββ ββββββββββββββββββ β
β β ebic-app β β ebic-worker β β
β β Next.js β β BullMQ Jobs β β
β β :3000 β β β β
β βββββββ¬ββββββ βββββββββ¬βββββββββ β
β β β β
β βββββββΌββββββ βββββββββΌβββββββββ β
β β MySQL 8 β β Redis 7 β β
β β :3306 β β :6379 β β
β βββββββββββββ ββββββββββββββββββ β
β βββββββββββββββββ β
β β MinIO (S3) β β
β β :9000/:9001 β β
β βββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββ
- Multi-Page Registration Forms: Innovators and Collaborators can submit multi-step applications with robust validation (Zod) and persistence (Zustand).
- Content Management: CMS-driven News, Strategic Plans, FAQs, and Academic Experts.
- Internationalization (i18n): Bilingual Arabic/English support with auto locale detection and custom Next.js routing.
- RBAC Dashboard: Centralized NextAuth-secured dashboard. Roles include
super_admin,admin,news_editor,request_reviewer, andviewer. - Submission Review: Approve/Reject Innovator & Collaborator registrations with integrated email queues.
- System Settings: Notification preferences, legal content management, and metric reporting.
- Frontend: Next.js 16.1.1 (App Router), React 19, Tailwind CSS, shadcn/ui.
- Backend: Hono.js API, Prisma 7 ORM, MySQL 8.0.
- Auth & Security: NextAuth.js v5, CSRF protection, Content Security Policies,
sanitize-html. - Infrastructure: Docker, Redis, BullMQ, AWS S3 / MinIO, Nodemailer.
- Node.js v18+ (v20 recommended)
- Package Manager: bun (recommended) or npm
- Docker & Docker Compose (for automated dependencies)
git clone https://github.com/mohammed3200/website.git
cd websitebun installWe recommend using Docker to run the database, redis, and MinIO locally.
docker-compose up -d db redis minioCopy the example file and update .env (refer to the Environment Variables section).
cp .env.example .envSee Database Seeding for the correct execution order.
bunx prisma migrate deploybun run dev
# Visit http://localhost:3000Key variables to configure in your .env:
# Database
DATABASE_URL="mysql://root:password@localhost:3306/citcoder_eitdc"
# Authentication
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="http://localhost:3000"
AUTH_TRUST_HOST="true"
# Initial Admin Credentials (CRITICAL: Change in production!)
INIT_ADMIN_EMAIL="ebic@cit.edu.ly"
INIT_ADMIN_PASSWORD="SecurePassword123!"
# Storage (MinIO Example)
AWS_REGION="us-east-1"
AWS_ACCESS_KEY_ID="minioadmin"
AWS_SECRET_ACCESS_KEY="minioadmin"
S3_ENDPOINT="http://localhost:9000"
S3_BUCKET_NAME="ebic-media"
S3_PUBLIC_ACCESS="true"
# Redis & Queue
REDIS_URL="redis://localhost:6379"
# Email Configuration
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="app-specific-password"
EMAIL_FROM="your-email@gmail.com"Order of execution is critical. Running the seeds incorrectly will fail to establish required roles.
- RBAC Initialization (Required First):
bun run seed:rbac
- Main Seed (Creates Super Admin & Base Content):
bun run seed
- Specific Content Seeds (Optional/Idempotent):
bunx tsx prisma/seed-faqs.ts bunx tsx prisma/seed-ebic-page-content.ts bunx tsx prisma/seed-academic-experts.ts
Refer to DEPLOYMENT.md for full VPS server hardening, Docker configurations, and Nginx SSL proxying steps.
- Harden Server & Install Docker.
- Setup Nginx & Certbot SSL.
- Clone repo, configure
.env.production. - Run
docker-compose build && docker-compose up -d. - Run migrations and seeds inside the container.
Distributed under the MIT License. See LICENSE for details.