Michilis 2fa378c360 fix(frontend): proxy /api to Express in dev; harden media file serving
- next.config: development-only rewrite /api/:path* to 127.0.0.1:4000; move
  sharp to experimental.serverComponentsExternalPackages for Next 14
- media/[id]/route: resolve storage at request time, fallbacks for
  backend/storage/media vs storage/media, async params, force-dynamic

Made-with: Cursor
2026-04-01 20:35:16 +00:00
2026-04-01 02:46:53 +00:00
2026-04-01 02:46:53 +00:00
2026-04-01 02:46:53 +00:00
2026-04-01 02:46:53 +00:00
2026-04-01 02:46:53 +00:00

Belgian Bitcoin Embassy

A Nostr-powered community website for Belgium's monthly Bitcoin meetup.

Tech Stack

  • Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, Shadcn/ui
  • Backend: Express.js, TypeScript, Prisma ORM
  • Database: SQLite (default), PostgreSQL supported
  • Auth: Nostr login (NIP-07), JWT sessions

Quick Start

1. Clone and install

# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../frontend
npm install

2. Configure environment

# From project root
cp .env.example backend/.env
cp .env.example frontend/.env.local

Edit backend/.env with your admin pubkeys and a secure JWT secret.

3. Set up database

cd backend
npx prisma generate
npx prisma db push
npx prisma db seed

4. Run development servers

# Terminal 1: Backend
cd backend
npm run dev

# Terminal 2: Frontend
cd frontend
npm run dev

Project Structure

/frontend          Next.js application
  /app             App Router pages
  /components      React components
  /lib             Utilities and API client
  /hooks           Custom React hooks

/backend           Express API server
  /src             Source code
    /api           Route handlers
    /services      Business logic
    /middleware     Auth middleware
  /prisma          Database schema and migrations

/context           Design specs (reference only)

API Endpoints

Method Path Description
POST /api/auth/challenge Get auth challenge
POST /api/auth/verify Verify Nostr signature
GET /api/posts List blog posts
GET /api/posts/:slug Get post by slug
POST /api/posts/import Import Nostr post
PATCH /api/posts/:id Update post
GET /api/meetups List meetups
POST /api/meetups Create meetup
PATCH /api/meetups/:id Update meetup
POST /api/moderation/hide Hide content
POST /api/moderation/block Block pubkey
GET /api/users List users
POST /api/users/promote Promote user
GET /api/categories List categories
POST /api/categories Create category

Roles

  • Admin: Full access. Defined by pubkeys in .env
  • Moderator: Content moderation. Assigned by admins via dashboard.

License

MIT

Description
Website / Nostr client of the Belgian Bitcoin Embassy btc meetups
Readme 2 MiB
Languages
TypeScript 92.2%
HTML 7.4%
CSS 0.2%
JavaScript 0.2%