BioForge is a premium link-in-bio platform specifically designed for streamers and content creators. Built with modern web technologies, it offers a fast, scalable, and customizable solution for showcasing all your content in one place.
- π¨ Customizable Profiles - Personalize your page with custom colors, avatar, and bioz
- π Link Management - Add, edit, reorder, and toggle links with ease
- π Analytics - Track profile views and link clicks
- β‘ Lightning Fast - Built with Astro SSR for optimal performance
- π― SEO Optimized - Full OpenGraph and meta tag support
- π Secure - Row-Level Security with Supabase
- π± Mobile First - Fully responsive designs
- π Production Ready - Scalable architecture ready for SaaS
- Frontend: Astro (SSR) + TypeScript + TailwindCSS
- Backend: Supabase (PostgreSQL + Auth + Storage)
- Deployment: Vercel (recommended)
- Package Manager: bun
- Node.js 20+ and pnpm
- Docker and Docker Compose (for local development)
- Supabase account (for production)
- Vercel account (for deployment)
- Clone the repository
git clone <your-repo-url>
cd bioforge- Set up environment variables
cp .env.example .envFor local development with Docker, use these values:
PUBLIC_SUPABASE_URL=http://localhost:54321
PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
PUBLIC_APP_URL=http://localhost:4321- Start the application
docker compose up --buildThis will start:
- BioForge App: http://localhost:4321
- Supabase API: http://localhost:54321
- Supabase Studio: http://localhost:54323
- Access Supabase Studio
Go to http://localhost:54323 and connect with:
- Database:
postgres - Password:
your-super-secret-and-long-postgres-password(or your custom password from .env)
The database migrations will run automatically on first start.
- Install dependencies
pnpm install- Set up Supabase
You have two options:
A. Use Supabase Cloud (Production)
- Create a project at supabase.com
- Copy your project URL and anon key to
.env:
PUBLIC_SUPABASE_URL=https://your-project.supabase.co
PUBLIC_SUPABASE_ANON_KEY=your-anon-key
PUBLIC_APP_URL=http://localhost:4321B. Use Supabase CLI (Local)
# Install Supabase CLI
npm install -g supabase
# Initialize Supabase
supabase init
# Start local Supabase
supabase start- Run migrations
If using Supabase CLI:
supabase db pushIf using Supabase Cloud:
- Go to your project dashboard
- Navigate to SQL Editor
- Copy and paste the contents of
supabase/migrations/20240101000000_initial_schema.sql - Run the SQL
- Create the avatars storage bucket
In Supabase Studio (http://localhost:54323 or your cloud dashboard):
-
Go to Storage
-
Create a new bucket named
avatars -
Make it public
-
The SQL migration already created the necessary policies
-
Start the dev server
pnpm devThe app will be available at http://localhost:4321
bioforge/
βββ src/
β βββ components/ # Reusable UI components
β β βββ LinkButton.astro
β β βββ ProfileHeader.astro
β β βββ Toast.astro
β βββ layouts/ # Page layouts
β β βββ BaseLayout.astro
β β βββ DashboardLayout.astro
β βββ lib/ # Core logic
β β βββ analytics.ts # Analytics helpers
β β βββ auth.ts # Authentication utilities
β β βββ supabaseClient.ts
β β βββ validators.ts # Input validation
β βββ pages/ # Route pages
β βββ api/ # API endpoints
β β βββ login.ts
β β βββ logout.ts
β β βββ register.ts
β β βββ track-click.ts
β βββ @[username].astro # Public profile page
β βββ dashboard.astro # User dashboard
β βββ index.astro # Landing page
β βββ login.astro
β βββ register.astro
βββ supabase/
β βββ migrations/ # Database migrations
β β βββ 20240101000000_initial_schema.sql
β βββ kong.yml # API gateway config
βββ astro.config.mjs
βββ docker-compose.yml
βββ Dockerfile
βββ package.json
βββ tailwind.config.mjs
βββ tsconfig.json
- profiles - User profiles with customization settings
- links - User links to display on their public page
- daily_profile_stats - Aggregated daily view counts
- daily_link_stats - Aggregated daily click counts
- β Row Level Security (RLS) enabled on all tables
- β Optimized indexes for performance
- β
Automatic
updated_attriggers - β RPC functions for scalable analytics
- β Username validation and reserved names
- β URL validation (blocks javascript: protocol)
- Row Level Security (RLS) enabled on all tables
- Users can only modify their own data
- Public profiles are read-only for visitors
- Analytics increments happen via secure RPC functions
- HTTP-only cookies for auth tokens
- Input validation on both client and server
- Reserved username protection
- XSS prevention via URL validation
BioForge includes a built-in analytics system that is:
- Scalable - Uses daily aggregation (no 1-row-per-view)
- Efficient - Utilizes PostgreSQL UPSERT for atomic operations
- Secure - Only accessible via RPC functions
- Privacy-focused - No personal data collection beyond counts
Analytics Functions:
increment_profile_view(username)- Tracks profile viewsincrement_link_click(link_id)- Tracks link clicks
Users can customize their profile page with:
- Display name and bio
- Avatar image (uploaded to Supabase Storage)
- Primary color (for link buttons)
- Background color
- Link ordering via drag & drop or up/down buttons
-
Push your code to GitHub
-
Import in Vercel
- Go to vercel.com
- Import your GitHub repository
- Framework Preset: Astro
- Build Command:
pnpm build - Output Directory:
dist
-
Set environment variables
PUBLIC_SUPABASE_URL=https://your-project.supabase.co
PUBLIC_SUPABASE_ANON_KEY=your-anon-key
PUBLIC_APP_URL=https://your-domain.vercel.app- Deploy!
The app will automatically deploy on every push to main.
-
Create a Supabase project
- Go to supabase.com
- Create a new project
-
Run migrations
- Go to SQL Editor
- Run the migration file:
supabase/migrations/20240101000000_initial_schema.sql
-
Create avatars bucket
- Go to Storage
- Create bucket named
avatars - Make it public
- Policies are already created by migration
-
Get your credentials
- Go to Settings > API
- Copy your Project URL and anon key
pnpm dev # Start dev server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm lint # Lint code
pnpm format # Format code- Start the application via Docker or manually
- Register a new account at http://localhost:4321/register
- Set up your profile in the dashboard
- Add some links
- Visit your public page at http://localhost:4321/@yourusername
| Variable | Description | Required |
|---|---|---|
PUBLIC_SUPABASE_URL |
Supabase project URL | Yes |
PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key | Yes |
PUBLIC_APP_URL |
Your app's URL | Yes |
Default JWT settings (for local Docker):
- JWT Secret:
your-super-secret-jwt-token-with-at-least-32-characters-long - JWT Expiry: 3600 seconds
For production, use strong secrets from Supabase dashboard.
BioForge is designed to scale:
- Database: Indexed queries, optimized joins
- Caching: HTTP cache headers on public profiles (
s-maxage=60) - CDN Ready: Static assets via Vercel Edge Network
- Analytics: Daily aggregation prevents table bloat
- Storage: Supabase CDN for avatars
- Profile pages are cached for 60 seconds
- Only 1 database query per profile page load
- Static assets are served from CDN
- Optimized images via Supabase Storage
Future features planned:
- Custom domains per user
- Stripe payment integration
- Advanced analytics dashboard
- Social login (Google, Discord, Twitch)
- Link scheduling
- A/B testing for links
- Team/Agency accounts
- API for third-party integrations
- Themes marketplace
This is a private commercial project. If you have access to this repository:
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Proprietary - All rights reserved
For issues or questions:
- Check existing issues on GitHub
- Create a new issue with detailed description
- Contact the development team
Built with:
Made with β€οΈ for streamers and creators