A modern, serverless imageboard built with Next.js 15 - Complete jschan replication with enhanced features
- π¨ Exact jschan UI - Pixel-perfect replication with 33 themes
- π Modern Stack - Next.js 15, React 19, TypeScript
- π Full Moderation - 13 moderation actions, staff management, reports, bans
- π° News System - Global announcements and updates
- π Custom Pages - Create custom board pages
- π₯ User System - Registration, login, 2FA support
- π― Board Management - 40+ configurable settings per board
- π± Responsive - Mobile-friendly design
- β‘ Serverless - Deploy to Vercel with zero config
- Node.js 18+
- MongoDB database
- Redis instance (for sessions)
# Clone the repository
git clone https://github.com/theabbie/Indiachan.git
cd indiachan
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env.local
# Edit .env.local with your credentials
# (See Environment Variables section below)
# Run development server
npm run devOpen http://localhost:3000 to see your imageboard.
Create a .env.local file with the following:
# Database (Required)
MONGODB_URI=mongodb+srv://user:[email protected]/indiachan
MONGODB_DB=indiachan
# Redis (Required for sessions)
REDIS_URL=redis://localhost:6379
# Security (Required - generate with: openssl rand -base64 32)
NEXTAUTH_SECRET=your-secret-here
CSRF_SECRET=your-secret-here
COOKIE_SECRET=your-secret-here
CRON_SECRET=your-secret-here
# Site Configuration
NEXT_PUBLIC_SITE_NAME=Indiachan
NEXT_PUBLIC_APP_URL=https://yourdomain.com
NEXT_PUBLIC_DISCORD_INVITE=https://discord.gg/your-invite
# reCAPTCHA (Optional but recommended)
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-keyopenssl rand -base64 32 # Run this 4 times for each secretRun these in your MongoDB shell:
use indiachan
// Posts indexes
db.posts.createIndex({ board: 1, postId: 1 })
db.posts.createIndex({ board: 1, thread: 1 })
db.posts.createIndex({ 'reports.0': 1 })
// Bans indexes
db.bans.createIndex({ 'ip.cloak': 1, board: 1 })
db.bans.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0 })
// Modlogs index
db.modlogs.createIndex({ board: 1, date: -1 })
// Accounts indexes
db.accounts.createIndex({ ownedBoards: 1 })
db.accounts.createIndex({ staffBoards: 1 })db.accounts.insertOne({
_id: "admin",
original: "admin",
passwordHash: "$2b$12$...", // Use bcrypt to hash "your-password"
permissions: Binary(Buffer.from([255, 255, 255, 255])),
ownedBoards: [],
staffBoards: [],
twofactor: null,
web3: false,
lastActiveDate: new Date(),
createdDate: new Date()
})Or use bcryptjs:
node -e "const bcrypt = require('bcryptjs'); console.log(bcrypt.hashSync('your-password', 12));"# Install Vercel CLI
npm i -g vercel
# Login
vercel login
# Deploy
vercel --prodAfter deployment:
- Add environment variables in Vercel Dashboard β Settings β Environment Variables
- Create a Redis database in Vercel β Storage β KV
- Redeploy to apply environment variables
# Build the application
npm run build
# Start with PM2
npm i -g pm2
pm2 start npm --name "indiachan" -- start
pm2 save
pm2 startup# Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]docker build -t indiachan .
docker run -p 3000:3000 --env-file .env.local indiachan- Login with admin credentials at
/login.html - Go to
/create.html - Fill in board details:
- URI: Short identifier (e.g.,
g,tech,pol) - Name: Display name (e.g., "Technology")
- Description: Brief description
- URI: Short identifier (e.g.,
- Click "Create"
Access board management at /{board}/manage/index.html
Available tools:
- Recent Posts - View and moderate recent activity
- Reports - Handle user reports
- Bans - Manage banned users
- Logs - View moderation history
- Settings - Configure board (40+ options)
- Staff - Add/remove moderators
- Custom Pages - Create custom board pages
- Delete posts
- Ban users (with duration and reason)
- Sticky/Lock/Cycle threads
- Spoiler files
- Move threads between boards
- Report dismissal
- And more..
Indiachan includes 33 themes from jschan:
- Yotsuba / Yotsuba-B
- Tomorrow / Midnight
- Photon / Dark Photon
- And 27 more!
Users can switch themes via the Settings menu.
indiachan/
βββ app/ # Next.js app directory
β βββ [board]/ # Dynamic board routes
β βββ api/ # API routes
β βββ account/ # User account pages
β βββ globalmanage/ # Global admin pages
β βββ styles/ # Global styles
βββ components/ # React components
βββ lib/ # Utility functions
β βββ db/ # Database models
β βββ auth.ts # Authentication
β βββ captcha.ts # reCAPTCHA
β βββ session.ts # Session management
βββ public/ # Static assets
β βββ css/themes/ # Theme CSS files
β βββ img/ # Icons and images
βββ types/ # TypeScript types
- β CSRF protection on all forms
- β Rate limiting on API endpoints
- β reCAPTCHA v3 integration
- β Secure session management
- β IP cloaking for privacy
- β 2FA support
- β XSS protection
- β SQL injection prevention (NoSQL)
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lintPOST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/logout- User logoutPOST /api/auth/changepassword- Change password
POST /api/boards/create- Create new boardPOST /api/boards/[board]/post- Create post/threadPOST /api/boards/[board]/actions- Moderation actionsPOST /api/boards/[board]/settings- Update board settings
POST /api/boards/[board]/staff/add- Add staff memberPOST /api/boards/[board]/bans/edit- Manage bansPOST /api/globalmanage/news/add- Add news post
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord: Join our server
- Issues: GitHub Issues
- Live Demo: neoindiachan.vercel.app
- WebSocket support for live updates
- File upload to Cloudflare R2
- Advanced search functionality
- Mobile app (React Native)
- Federation support
- API documentation
Made with β€οΈ for the imageboard community