A community-driven platform for open discussion with AI-powered moderation. Built with Next.js, Prisma, and SQLite.
- Communities — Create and join communities (like subreddits)
- Posts — Text, link, and image posts with voting
- Comments — Nested threading (10 levels deep)
- Voting — Upvote/downvote system with karma
- SaiditBot — AI content filter that auto-deletes illegal/harmful content
- Soft Moderation — Content is removed, users are never banned
- Karma System — Earn karma through upvotes and daily logins
- Invite-Only Registration — Requires valid invite code
- User Settings — Profile, notifications, theme, personalization
- Saidit Games — Embedded games (Elden Earth)
- Search — Real-time search for posts, communities, users
- Notifications — Alerts for replies, upvotes, bot actions
- Frontend: Next.js 16, React 19, Tailwind CSS 4
- Backend: Next.js API Routes
- Database: SQLite via Prisma ORM
- Auth: JWT cookies
- Bot: Custom content filter engine
# Clone and install
cd saidit/saidit-app
npm install
# Initialize database
npx prisma db push
npx prisma generate
# Seed data
npx tsx prisma/seed.ts
# Start dev server
npx next dev --port 3050Test credentials:
- Admin:
admin/admin123 - Demo:
demo/demo123 - Invite Code:
WELCOME1
- Push code to GitHub
- Go to railway.app
- Connect your GitHub repo
- Railway auto-detects Next.js and deploys
- Add environment variable:
JWT_SECRET=<your-secret> - Upgrade to Hobby ($5/mo) when ready for production
Free tier: 500 hours/month — enough for low traffic.
- Push code to GitHub
- Go to render.com
- Create a new Web Service
- Connect your repo
- Build command:
npm install && npx prisma generate && npm run build - Start command:
npm run start - Add env var:
JWT_SECRET=<your-secret>
Free tier: Spins down after inactivity (cold starts).
- Push code to GitHub
- Go to vercel.com
- Import your repo
- Deploy
Note: SQLite won't persist on Vercel. Switch to PostgreSQL for production:
- Use Neon (free PostgreSQL)
- Update
prisma/schema.prismaprovider to"postgresql" - Set
DATABASE_URLenv var
| Service | Free Tier | Notes |
|---|---|---|
| SQLite | Unlimited | Local/dev only |
| Neon | 512 MB | PostgreSQL, recommended for production |
| Supabase | 500 MB | PostgreSQL + auth |
| Turso | 9 GB | SQLite edge database |
- Add your domain to Cloudflare
- Point DNS to your hosting provider
- Enable proxy (orange cloud)
- Enable SSL/TLS (Full mode)
- Set up Page Rules for caching
- Deploy your site first
- Go to adsense.google.com
- Add your site URL
- Wait for approval (1-14 days)
- Create ad units (banner, sidebar)
- Add ad code to layout components
Recommended ad placements:
- Header banner (728x90)
- Sidebar (300x250)
- Between posts (responsive)
- Go to console.firebase.google.com
- Create a new project
- Add Firebase Analytics to track users
- Use Firebase Hosting for static assets
| Year | Users | Monthly Cost | Stack |
|---|---|---|---|
| Year 1 | Up to 500 | $0 | Free tier (Railway/Render) + Neon |
| Year 2 | Up to 750 | $5-10 | Railway Hobby + Neon |
| Year 3 | Up to 1000 | $15-25 | Railway Pro + Neon paid |
| Year 4+ | +250/year | Scale up | Add load balancer |
- Year 1: 500 max users
- Year 2: 750 max users
- Year 3: 1000 max users
- Each subsequent year: +250 users
- Enforced via invite-only registration
The AI bot automatically detects and removes:
| Category | Action |
|---|---|
| CSAM / Child Exploitation | Delete + -2 karma |
| Terrorism / Violence | Delete + -2 karma |
| Threats / Incitement | Delete + -2 karma |
| Doxing | Delete + -2 karma |
| Self-Harm | Delete + -2 karma |
| Malware / Hacking | Delete + -2 karma |
| Hate Speech | Delete + -2 karma |
| Illegal Drugs | Delete + -2 karma |
| Illegal Weapons | Delete + -2 karma |
| Spam / Scams | Delete + -2 karma |
| NSFW | Flag |
| Suspicious Links | Flag |
Karma Rules:
- -2 karma per bot deletion
- +2 karma for daily login (if active within 3 days)
- +1 karma per upvote received
- Cannot post/comment with negative karma
saidit-app/
├── prisma/
│ ├── schema.prisma # Database schema
│ ├── seed.ts # Seed data
│ └── dev.db # SQLite database
├── src/
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── c/ # Community pages
│ │ ├── games/ # Games section
│ │ ├── post/ # Post detail pages
│ │ ├── settings/ # User settings
│ │ ├── search/ # Search results
│ │ └── u/ # User profiles
│ ├── components/ # React components
│ └── lib/
│ ├── auth.ts # JWT auth
│ ├── bot.ts # SaiditBot engine
│ ├── karma.ts # Karma system
│ ├── screening.ts # Content screening
│ └── session.ts # Session management
└── README.md
- Real-time updates (WebSocket)
- Dark mode toggle
- Direct messages
- User following
- Post flairs
- Advanced search filters
- Mobile app (React Native)
- OAuth (Google, GitHub)
- Two-factor authentication
- Custom community themes
- Post awards/trophies
- Mod log transparency
Private — All rights reserved.