A completely anonymous Reddit clone designed for the Tor network with automatic post deletion after 72 hours. Built with SvelteKit and Supabase, featuring server-side rendering only (no client-side JavaScript) for maximum privacy and security.
- Complete Anonymity: No user accounts, registration, or tracking
- Auto-Deletion: All posts and comments automatically delete after 72 hours
- Tor-Optimized: Designed specifically for .onion websites
- Server-Side Only: No client-side JavaScript for enhanced security
- Anonymous Voting: IP-based voting system with hashed IPs for privacy
- Nested Comments: Support for threaded discussions up to 10 levels deep
- Security Headers: Strict CSP and privacy-focused HTTP headers
- Frontend: SvelteKit (SSR-only mode)
- Backend: Node.js 20+ with ESM modules
- Database: Supabase (PostgreSQL)
- Package Manager: pnpm
- Security: Strict Content Security Policy, no client-side JS
- Node.js 20 or newer
- pnpm 8 or newer
- Supabase account and project
- Clone the repository:
git clone <repository-url>
cd unyunddit- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .envEdit .env with your Supabase credentials:
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key- Run database migrations:
pnpx supabase db reset- Start the development server:
pnpm run devThe application uses three main tables:
id: Unique identifiertitle: Post title (max 300 chars)content: Post text content (max 10,000 chars, optional)url: External link (max 2,000 chars, optional)upvotes/downvotes: Vote countscomment_count: Number of commentscreated_at/expires_at: Timestamps
id: Unique identifierpost_id: Reference to parent postparent_id: Reference to parent comment (for nesting)content: Comment text (max 5,000 chars)upvotes/downvotes: Vote countsdepth: Nesting level (max 10)created_at/expires_at: Timestamps
id: Unique identifierip_hash: SHA256 hash of voter's IP addresspost_id/comment_id: Reference to voted itemvote_type: 'up' or 'down'created_at/expires_at: Timestamps
- No user accounts or personal data collection
- IP addresses are hashed with SHA256 for voting
- Strict Content Security Policy blocks all JavaScript
- No referrer headers sent to external sites
- Server identification headers removed
- Server-side rendering only (no client-side JS)
- Minimal external dependencies
- Privacy-focused HTTP headers
- No tracking or analytics
- Posts and comments auto-delete after 72 hours
- Automated cleanup via PostgreSQL cron jobs
- Cascading deletes for related data
/- Home page (posts sorted by score)/new- New posts (sorted by creation time)/submit- Submit new post/post/[id]- Individual post with comments
POST /?/upvote- Upvote a postPOST /?/downvote- Downvote a postPOST /submit?/submit- Create new postPOST /post/[id]?/comment- Add commentPOST /post/[id]?/upvoteComment- Upvote commentPOST /post/[id]?/downvoteComment- Downvote comment
src/
├── lib/
│ └── supabase.js # Database client
├── routes/
│ ├── +layout.svelte # Base layout
│ ├── +page.svelte # Home page
│ ├── +page.server.js # Home page logic
│ ├── new/ # New posts page
│ ├── submit/ # Submit post page
│ └── post/[id]/ # Individual post page
├── hooks.server.js # Security headers
└── app.html # HTML template
pnpm run dev # Start development server
pnpm run build # Build for production
pnpm run preview # Preview production build
pnpm run test # Run tests
pnpm run lint # Lint code
pnpm run format # Format codepnpx supabase db reset # Reset database
pnpx supabase migrations new <name> # Create new migration
pnpm run db:migrate # Create migration (alias)docker build -t unyunddit .
docker run -p 3000:3000 unyundditpnpm run deploy:railwaypnpm run deploy:digitaloceanSUPABASE_URL: Your Supabase project URLSUPABASE_ANON_KEY: Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY: Supabase service role key (for admin operations)
The application sets strict security headers via hooks.server.js:
- Content Security Policy (blocks all JavaScript)
- Referrer Policy (no-referrer)
- X-Frame-Options (DENY)
- X-Content-Type-Options (nosniff)
- Permissions Policy (blocks geolocation, camera, microphone)
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the WTFPL License - see the LICENSE file for details.
This application is designed for maximum privacy:
- No personal data is collected or stored
- IP addresses are only used for voting (hashed with SHA256)
- All content automatically deletes after 72 hours
- No tracking, analytics, or third-party services
- Designed for use on the Tor network
For issues and questions, please use the GitHub issue tracker.