Project Documentation
This page renders the repository DOCS.md for convenience. Use the sidebar to navigate docs sections.
# Lastbench — Documentation This document contains detailed instructions for running, developing, and deploying Lastbench (Genfess repository). ## Overview Lastbench is an anonymous, college-focused social platform: verified students can post anonymously, comment, like, and receive realtime updates. ## Features - College Email Verification - Anonymous Posting & Comments - Realtime updates (Supabase Realtime) - Image uploads - Likes, comments, notifications - PWA & offline support ## Tech Stack - Frontend: React + TypeScript + Next.js (App Router) - Backend: Supabase (Postgres + Realtime + Auth + Storage) - Styling: Tailwind CSS - Mobile: Capacitor (optional) ## Getting Started (Local Development) Prerequisites: - Node.js 18+ - pnpm / npm / yarn - Supabase project (optional for full features) Quick start: ```bash git clone https://github.com/Mohamed-faaris/Genfess.git cd Genfess pnpm install cp .env .env.local # Edit .env.local and add required values (see below) pnpm dev ``` ### Important environment variables - `NEXT_PUBLIC_BASE_URL` — e.g. `https://your-domain.com` - If using Supabase (Genfess): - `VITE_SUPABASE_URL` / `NEXT_PUBLIC_SUPABASE_URL` - `VITE_SUPABASE_ANON_KEY` / `NEXT_PUBLIC_SUPABASE_ANON_KEY` - `VITE_USE_SUPABASE_REALTIME` (true/false) These env vars are validated by `src/env.js`. Update that file if you add more `NEXT_PUBLIC_` variables. ## Metadata & Open Graph This project uses the Next.js App Router `Metadata` API in `src/app/layout.tsx` and page-level `metadata` exports. - Global metadata is set in `src/app/layout.tsx` (`metadataBase`, title, description, keywords, openGraph, twitter). - Per-page metadata examples can be found in `src/app/about/page.tsx` and `src/app/pricing/page.tsx`. - Default Open Graph image is `public/og-image.svg`. Replace with `public/og-image.png` for better compatibility. - JSON-LD Organization schema is injected into the homepage. ## sitemap.xml and robots.txt - `src/app/sitemap.ts` generates `sitemap.xml` using `NEXT_PUBLIC_BASE_URL`. - `src/app/robots.ts` generates `robots.txt` and refers to the sitemap. Add routes to `sitemap.ts` for any static pages you want indexed. Update the `disallow` array in `robots.ts` to control crawlers. ## Pages added - `/` — Home (intro, features, JSON-LD) - `/about` — About & tech stack - `/pricing` — Open-source note & self-hosting - `/faq` — Frequently asked questions - `/roadmap` — Planned features - `/contact` — Contact & community links ## Self-hosting & Deployment 1. Set your environment variables (see above). 2. Build and run: ```bash pnpm build pnpm start ``` For deployment to Vercel or other providers, set the environment variables in the hosting dashboard. Use `NEXT_PUBLIC_BASE_URL` as the canonical base URL. ## Contributing - Fork the repo, create a feature branch, open a Pull Request. - Run tests and ensure `pnpm build` succeeds. - Follow code style and commit messages. ## Troubleshooting - If Realtime isn't working, verify Supabase Realtime settings and env vars. - If types fail on build, check `src/env.js` for variable validation. ## Useful commands ```bash pnpm dev # runs the dev server pnpm build # builds for production pnpm start # run production build pnpm typecheck # run TypeScript checks ``` ## License MIT --- Generated/updated by automation to add documentation and usage instructions.