A modern full-stack web application for the Brackeys Discord community, built with TanStack Start, React 19, and a self-hosted backend stack.
- Frontend: React 19 + TypeScript + TanStack Start + Tailwind CSS v4
- Routing: TanStack Router (file-based with SSR support)
- State: TanStack Query + TanStack Store
- Authentication: Clerk (Discord OAuth only)
- API: Hasura GraphQL Engine v3 (DDN)
- Database: PostgreSQL
- Cache: Redis
- Storage: MinIO (S3-compatible)
- Real-time: SpacetimeDB (Rust/WASM)
# 1. Install dependencies
bun install
# 2. Build SpacetimeDB module (first time only)
cd spacetime-db
cargo build --release --target wasm32-unknown-unknown
cd ..
# 3. Configure environment
cp .env.example .env
# Edit .env with your Clerk keys
# 4. Start backend services (requires Docker)
docker-compose up -d
# 5. Start development server
bun run devVisit http://localhost:3000 to see your app!
brackeys/
├── hasura/ # Hasura GraphQL metadata & migrations
├── spacetime-db/ # SpacetimeDB Rust module (WASM)
├── src/
│ ├── routes/ # File-based routes (TanStack Router)
│ │ ├── index.tsx # Home page
│ │ ├── login.tsx # Login page
│ │ ├── profile.tsx # User profile
│ │ ├── sandbox.tsx # Real-time canvas
│ │ ├── resources.tsx # Games & tools
│ │ ├── collaborations/ # Collaboration marketplace
│ │ ├── auth/ # Auth flow pages
│ │ └── api/ # API routes (webhooks, etc.)
│ ├── components/ # React components
│ │ ├── auth/ # Auth guards, login button
│ │ ├── collaborations/ # Collab cards, filters
│ │ ├── games/ # Games (Snake, etc.)
│ │ ├── home/ # Hero, features, CTA
│ │ ├── layout/ # Header, footer, main layout
│ │ ├── resources/ # Resource cards, filters
│ │ ├── sandbox/ # Canvas, cursors, messages
│ │ └── ui/ # Reusable UI (Button, Input, Modal)
│ ├── context/ # React Context providers
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities & configurations
│ ├── server/ # Server functions
│ │ ├── auth/ # Discord sync
│ │ ├── webhooks/ # Clerk webhooks
│ │ └── graphql/ # GraphQL wrappers
│ └── styles.css # Global styles
├── docs/ # Comprehensive documentation
├── .storybook/ # Storybook configuration
└── mise.toml # Development tooling
- Collaborative canvas powered by SpacetimeDB (Rust)
- Live cursor tracking (~140fps)
- Real-time typing indicators
- Ephemeral messages with configurable TTL
- Room system with password protection
- Post collaboration opportunities
- Advanced filtering (type, hiring status, tags)
- Response system (public/private)
- Bookmarks and view tracking
- Dynamic form fields based on post type
- OAuth via Clerk
- Automatic role syncing (Discord → Hasura)
- Guild membership validation
- Custom profile page with Discord data
- Curated resources for developers
- Filter by type, category, tags
- Embedded games (Snake, etc.)
TanStack Start supports flexible server-side rendering. Routes use Full SSR by default.
Everything rendered server-side for best SEO and initial load:
export const Route = createFileRoute('/my-route')({
component: MyComponent,
});Server fetches data, client renders UI (hybrid approach):
export const Route = createFileRoute('/my-route')({
ssr: 'data-only',
component: MyComponent,
loader: async () => {
return await fetchDataServerSide();
},
});Fully client-side rendering (like traditional React):
export const Route = createFileRoute('/my-route')({
ssr: false,
component: MyComponent,
});- User clicks "Sign in with Discord"
- Clerk handles OAuth with Discord
- Webhook fires on
user.createdorsession.created - Server fetches Discord guild member data
- Maps Discord roles → Hasura roles (admin, staff, moderator, brackeys, user)
- Updates Clerk metadata with Hasura claims
- User redirected to
/auth/entryfor guild validation - If in guild → redirect to app; if not → show error
See docs/AUTH_FLOW.md for details.
All development tasks are managed through mise or bun scripts:
# Core Development
mise run dev # Start all services (Hasura + Frontend)
mise run dev-frontend # Frontend only
mise run dev-hasura # Hasura only
# Code Quality
bun run lint # Run linting
bun run lint:fix # Fix linting issues
bun run format # Format code
bun run format:check # Check formatting
bun run check # Run all checks
# Building & Generation
bun run build # Production build
bun run graphql-codegen # Generate GraphQL types
bun run storybook # Component documentation
# Versioning & Commits
bun run commit # Commitizen (conventional commits)
bun run release # Create version release
mise run pre-commit # Run all pre-commit checks
# Utilities
mise run check # Verify tool installation
mise run doctor # Health check
mise run clean # Clean generated files
mise tasks # List all available tasks- MIGRATION_STATUS.md - Current migration status from brackeys-web
- docs/AUTH_FLOW.md - Authentication architecture
- docs/DEVELOPMENT_SETUP.md - Setup guide
- docs/HASURA_SETUP.md - Hasura configuration
- docs/STORYBOOK_CHROMATIC.md - Storybook deployment
- Storybook Live - Component documentation
Create a .env file based on .env.example:
# Clerk Authentication
VITE_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
CLERK_WEBHOOK_SECRET=whsec_...
# Hasura GraphQL
VITE_HASURA_GRAPHQL_URL=http://localhost:3280/graphql
HASURA_GRAPHQL_ADMIN_SECRET=your_secret
HASURA_GRAPHQL_JWT_SECRET=your_jwt_secret
# SpacetimeDB
VITE_SPACETIME_HOST=wss://localhost:3000
VITE_SPACETIME_MODULE=brackeys-sandbox
# Discord
VITE_BRACKEYS_GUILD_ID=240491168985399296
DISCORD_GUILD_ID=240491168985399296# Run tests
bun run test
# Type check
bunx tsc --noEmit
# Storybook (visual testing)
bun run storybook
# E2E tests (Playwright)
bunx playwright test- Start Docker Desktop
- Ensure Docker is set to use WSL2 (Windows)
curl https://mise.run | sh
echo 'eval "$(mise activate bash)"' >> ~/.bashrc
source ~/.bashrc# Find and kill process using port 3000
lsof -i :3000 # macOS/Linux
netstat -ano | findstr :3000 # Windows# Rebuild the Rust module
cd spacetime-db
cargo clean
cargo build --release --target wasm32-unknown-unknown
cd ..See docs/DEVELOPMENT_SETUP.md for more troubleshooting.
All managed via Docker Compose:
- PostgreSQL - Main database (port 5432)
- Hasura - GraphQL API (port 8080) - Console
- Redis - Caching (port 6379)
- MinIO - Object storage (ports 9000/9001) - Console
- Brackeys Yellow:
#ffa949 - Brackeys Fuscia:
#d2356b - Brackeys Purple:
#5865f2(with variants 100-900) - Discord Blue:
#5865f2
- Pattern backgrounds:
.bg-dot-pattern,.bg-line-pattern - Pattern masks:
.pattern-mask-radial,.pattern-mask-fade-in/out - Custom scrollbars:
.custom-scrollbar
bun run build
# Deploy to Vercelcd hasura
ddn supergraph build createbun run build-storybook
# Auto-deployed via GitHub Actions# 1. Create a feature branch
git checkout -b feature/my-feature
# 2. Make changes
# ...
# 3. Commit with Commitizen
bun run commit
# 4. Push and create PR
git push origin feature/my-featureMIT License - see LICENSE file for details.
- Live App: https://brackeys.dev
- Storybook: https://brackeyscommunity.github.io/brackeys.community/
- Discord: Join the Brackeys Discord community
- GitHub: https://github.com/brackeyscommunity/brackeys-web
Built with ❤️ by the Brackeys Community