{"id":42061271,"url":"https://github.com/m1rl0k/nextjsforum","last_synced_at":"2026-01-26T07:40:37.971Z","repository":{"id":242717278,"uuid":"810365708","full_name":"m1rl0k/nextjsforum","owner":"m1rl0k","description":"NextJS Forum","archived":false,"fork":false,"pushed_at":"2025-12-01T01:59:27.000Z","size":4193,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T21:25:57.608Z","etag":null,"topics":["bulletin-board","bulletin-board-system","forum","forums","javascript","nextjs14","open-source"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m1rl0k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-04T14:52:54.000Z","updated_at":"2025-12-01T01:59:30.000Z","dependencies_parsed_at":"2025-06-07T15:35:06.944Z","dependency_job_id":null,"html_url":"https://github.com/m1rl0k/nextjsforum","commit_stats":null,"previous_names":["m1rl0k/nextjsforum"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/m1rl0k/nextjsforum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1rl0k%2Fnextjsforum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1rl0k%2Fnextjsforum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1rl0k%2Fnextjsforum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1rl0k%2Fnextjsforum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1rl0k","download_url":"https://codeload.github.com/m1rl0k/nextjsforum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1rl0k%2Fnextjsforum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28769853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T06:37:25.426Z","status":"ssl_error","status_checked_at":"2026-01-26T06:37:23.039Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bulletin-board","bulletin-board-system","forum","forums","javascript","nextjs14","open-source"],"created_at":"2026-01-26T07:40:37.346Z","updated_at":"2026-01-26T07:40:37.960Z","avatar_url":"https://github.com/m1rl0k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextJS Forum\n\nA **commercial-grade forum software** built with Next.js, styled to resemble classic vBulletin/phpBB forums. This application features a complete forum ecosystem with advanced administration, user management, and commercial-ready features.\n\n##  Commercial Features\n\n### **Core Forum Features**\n-  **Forum Structure**: Categories, subjects, threads with full hierarchy\n-  **Rich Content**: Thread viewing with pagination and rich text posts\n-  **User Interaction**: Post reactions, thread subscriptions, user profiles\n-  **Search \u0026 Discovery**: Advanced search functionality across all content\n-  **Responsive Design**: Mobile-first design that works on all devices\n\n### **User Management System**\n-  **Authentication**: Secure login/register with JWT tokens\n-  **User Profiles**: Avatars, signatures, bio, location, reputation system\n-  **User Groups**: Configurable user groups with granular permissions\n-  **Moderation**: User banning, warning system, activity tracking\n-  **Statistics**: Post counts, reputation points, join dates, last activity\n\n### **Administration Panel**\n-  **Dashboard**: Real-time forum statistics and activity monitoring\n-  **User Management**: Ban/unban users, role management, bulk operations\n-  **Content Management**: Thread/post moderation, approval system\n-  **Theme Customization**: Live theme editor with real-time preview\n-  **Settings Management**: Comprehensive forum configuration\n-  **Reporting System**: User reports, content moderation queue\n\n### **Commercial-Ready Features**\n-  **Installation Wizard**: Professional setup process like phpBB/vBulletin\n-  **Hybrid Storage**: JSON + Database for maximum flexibility\n-  **Configuration Export/Import**: Easy forum migration and backup\n-  **Performance Optimized**: Caching, indexing, optimized queries\n-  **Security**: Input validation, CSRF protection, rate limiting\n-  **Multi-Database**: SQLite, PostgreSQL, MySQL support\n\n##  Tech Stack\n\n- **Frontend**: Next.js 14, React 18, CSS Modules\n- **Backend**: Node.js API routes with comprehensive REST endpoints\n- **Database**: PostgreSQL/MySQL/SQLite with Prisma ORM\n- **Authentication**: JWT (JSON Web Tokens) with secure session management\n- **Storage**: Hybrid JSON + Database approach for maximum flexibility\n- **Containerization**: Docker \u0026 Docker Compose for easy deployment\n- **Styling**: Custom vBulletin/phpBB-inspired theme with live customization\n- **Performance**: Optimized queries, caching, and indexing\n\n##  Prerequisites\n\n- **Node.js 18+** (LTS recommended)\n- **Database**: PostgreSQL (recommended), MySQL, or SQLite\n- **Docker \u0026 Docker Compose** (for easy PostgreSQL setup)\n- **npm or yarn** package manager\n\n##  Quick Start\n\n### Option 1: Guided Installation (Recommended)\n\n1. **Clone and Install**\n   ```bash\n   git clone https://github.com/yourusername/nextjs-forum.git\n   cd nextjs-forum\n   npm install\n   ```\n\n2. **Start Database (PostgreSQL)**\n   ```bash\n   docker-compose up -d postgres\n   ```\n\n3. **Run Installation Wizard**\n   ```bash\n   npm run dev\n   ```\n   Navigate to `http://localhost:3000/install` and follow the setup wizard.\n\n### Option 2: Manual Setup\n\n1. **Environment Configuration**\n   ```bash\n   cp .env.example .env\n   ```\n   Update `.env` with your settings:\n   ```env\n   DATABASE_URL=\"postgresql://user:password@localhost:5432/forum\"\n   JWT_SECRET=\"your-super-secret-jwt-key\"\n   USE_DATABASE_SETTINGS=true\n   ```\n\n2. **Database Setup**\n   ```bash\n   # Start PostgreSQL\n   docker-compose up -d postgres\n\n   # Setup database schema\n   npx prisma db push\n\n   # Seed with sample data\n   npx prisma db seed\n   ```\n\n3. **Start Development Server**\n   ```bash\n   npm run dev\n   ```\n\n4. **Access Your Forum**\n   - **Forum**: [http://localhost:3000](http://localhost:3000)\n   - **Admin Panel**: [http://localhost:3000/admin](http://localhost:3000/admin)\n   - **Login**: `admin@example.com` / `admin123`\n\n##  Development\n\n### Available Scripts\n\n- `npm run dev` - Start the development server\n- `npm run build` - Build the application for production\n- `npm start` - Start the production server\n- `npm run lint` - Run ESLint\n- `npm run prisma:studio` - Open Prisma Studio for database management\n- `npx prisma db seed` - Seed database with sample data\n- `npx prisma db push` - Push schema changes to database\n\n### Database Management\n\nThis project uses **Prisma ORM** with support for multiple databases:\n\n**Schema Changes:**\n1. Update the schema in `prisma/schema.prisma`\n2. Push changes to database:\n   ```bash\n   npx prisma db push\n   ```\n3. Regenerate the Prisma Client:\n   ```bash\n   npx prisma generate\n   ```\n\n**Database Options:**\n- **PostgreSQL** (recommended for production)\n- **MySQL/MariaDB** (good alternative)\n- **SQLite** (perfect for development)\n\n### Hybrid Storage System\n\nNextJS Forum uses a **hybrid storage approach**:\n\n- **JSON Files**: Default settings and development configuration\n- **Database**: User customizations and production settings\n- **Automatic Fallback**: Graceful degradation when database unavailable\n\nThis ensures the forum works in any environment while providing commercial-grade scalability.\n\n## 📁 Project Structure\n\n```\nnextjs-forum/\n├── components/           # Reusable UI components\n│   ├── admin/           # Admin panel components\n│   ├── Layout.js        # Main layout wrapper\n│   ├── Navigation.js    # Forum navigation\n│   ├── Category.js      # Category display\n│   └── ThemeProvider.js # Theme management\n├── pages/               # Next.js pages and API routes\n│   ├── api/            # Backend API endpoints\n│   │   ├── admin/      # Admin management APIs\n│   │   ├── auth/       # Authentication endpoints\n│   │   ├── users/      # User management\n│   │   └── install/    # Installation wizard APIs\n│   ├── admin/          # Admin panel pages\n│   ├── install/        # Installation wizard\n│   ├── subjects/       # Forum subjects/categories\n│   └── threads/        # Thread viewing\n├── context/            # React context providers\n│   └── AuthContext.js  # Authentication state\n├── lib/                # Utility libraries\n│   ├── prisma.js       # Database client\n│   ├── auth.js         # Authentication helpers\n│   └── settingsService.js # Hybrid settings management\n├── prisma/             # Database schema and migrations\n│   ├── schema.prisma   # Database schema\n│   ├── seed.ts         # Database seeding\n│   └── migrations/     # Database migrations\n├── styles/             # Styling and themes\n│   ├── globals.css     # Global styles\n│   ├── Admin*.module.css # Admin panel styles\n│   └── Install.module.css # Installation wizard styles\n├── config/             # Configuration files\n│   └── template-settings.json # Theme settings\n├── docker-compose.yml  # Docker services\n├── INSTALL.md          # Installation guide\n└── README.md           # This documentation\n```\n\n##  Deployment\n\n### Production Deployment\n\n#### Docker (Recommended)\n```bash\n# Build and deploy with Docker\ndocker-compose up -d --build\n\n# Or deploy individual services\ndocker-compose up -d postgres\ndocker-compose up -d app\n```\n\n#### Manual Deployment\n```bash\n# Build the application\nnpm run build\n\n# Set production environment variables\nexport NODE_ENV=production\nexport DATABASE_URL=\"your-production-db-url\"\nexport JWT_SECRET=\"your-production-secret\"\nexport USE_DATABASE_SETTINGS=true\n\n# Start production server\nnpm start\n```\n\n#### Platform-Specific Deployments\n\n**Vercel:**\n1. Connect your Git repository\n2. Set environment variables in dashboard\n3. Deploy automatically on push\n\n**Railway/Render:**\n1. Connect repository\n2. Configure environment variables\n3. Set build command: `npm run build`\n4. Set start command: `npm start`\n\n**VPS/Dedicated Server:**\n1. Use PM2 for process management\n2. Configure Nginx reverse proxy\n3. Set up SSL certificates\n4. Configure database backups\n\n### Environment Variables for Production\n\n```env\nNODE_ENV=production\nDATABASE_URL=postgresql://user:pass@host:5432/forum\nJWT_SECRET=your-super-secure-secret-key\nUSE_DATABASE_SETTINGS=true\nFORUM_INSTALLED=true\nNEXTAUTH_URL=https://your-domain.com\n```\n\n##  Production Deployment\n\nThis forum is **production-ready** with enterprise-grade features:\n\n###  Production Features Included\n\n**Security:**\n- XSS protection (DOMPurify sanitization)\n- CSRF protection (enabled in production)\n- SQL injection protection (Prisma ORM)\n- Rate limiting on authentication endpoints\n- Secure password hashing (bcrypt)\n- HttpOnly, SameSite, Secure cookies\n- Input validation (Zod schemas)\n- Security headers (CSP, HSTS, X-Frame-Options)\n\n**Email System:**\n- SMTP integration (Gmail, SendGrid, AWS SES)\n- Password reset functionality\n- Email verification (optional)\n- Welcome emails\n- Notification emails\n\n**Performance:**\n- Database indexes on all critical queries\n- Optimized N+1 query prevention\n- Compression enabled\n- Image optimization\n- Standalone Docker builds\n- Health check endpoint\n\n**SEO:**\n- Dynamic sitemap generation (`/api/sitemap.xml`)\n- robots.txt configured\n- Meta tags and OpenGraph support\n- Clean URLs with slugs\n\n**Monitoring:**\n- Health check API (`/api/health`)\n- Database connection monitoring\n- Memory usage tracking\n- Uptime reporting\n\n**Deployment Options:**\n- Docker \u0026 Docker Compose (recommended)\n- Vercel\n- Railway / Render\n- VPS with PM2 + Nginx\n- DigitalOcean App Platform\n\n###  Quick Production Deploy\n\n```bash\n# 1. Clone and configure\ngit clone \u003cyour-repo\u003e\ncd nextjsforum\ncp .env.production.example .env.production\n\n# 2. Edit .env.production with your settings\nnano .env.production\n\n# 3. Deploy with Docker\ndocker-compose -f docker-compose.prod.yml up -d --build\n\n# 4. Visit http://your-domain.com/install\n```\n\n**See [PRODUCTION.md](./PRODUCTION.md) for complete deployment guide.**\n\n###  What's Included\n\n-  Installation wizard on first startup\n-  Admin panel for forum management\n-  User authentication \u0026 authorization\n-  Categories, forums (subjects), threads, posts\n-  Private messaging system\n-  Notification system\n-  Moderation tools \u0026 reporting\n-  User profiles \u0026 avatars\n-  Search functionality\n-  Thread subscriptions\n-  Post reactions\n-  User groups \u0026 permissions\n-  Theme customization\n-  Backup \u0026 restore\n-  Multi-database support (PostgreSQL, MySQL, SQLite)\n\n## Contributing\n\n1. Fork the repository\n2. Create a new branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by classic vBulletin and phpBB forums\n- Built with Next.js and modern web technologies\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1rl0k%2Fnextjsforum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1rl0k%2Fnextjsforum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1rl0k%2Fnextjsforum/lists"}