41f4aef61499e6e483841fce0bb45b16288fdbc6
Devodytyji — open-air cultural venue website
Website for an open-air cultural venue ("відкритий культурний майданчик") with events, venue reviews, event reviews, a venue map, and a contact inbox. Built with Astro 7 (SSR, Netlify adapter), React islands, Supabase, Leaflet, and a UA/EN i18n setup.
Stack
- Astro 7 —
output: 'server',@astrojs/netlifyadapter, i18nprefixDefaultLocale - React islands — auth form, contact form, review forms, map (
react-leaflet), event filters/editor - Supabase — Postgres, Auth, Storage (event covers), RLS, DB-triggered admin grant
- npm — Node 20+, sharp is pinned via
overrides(sharp: 0.35.3) to fix a native-build issue on this machine
Project structure
src/
components/
islands/ # React + framework islands (AuthForm, MapView, EventEditor, ...)
ui/ # Stars, EventCard, ReviewCard
Header.astro, Footer.astro
layouts/ # BaseLayout (public, SEO/i18n), AdminLayout
lib/ # supabase clients, db helpers, i18n dictionaries, format, venue, request
middleware.ts # locale redirects, session refresh, admin guards
pages/
[lang]/ # public pages (ua/en)
admin/ # admin area (UA only, not locale-prefixed)
api/ # auth, reviews, contact, admin API routes
supabase/
migrations/0001_init.sql # schema, RLS, storage, helper functions
seed.sql # sample events + contact messages
Local development
- Install dependencies:
npm install - Set up Supabase:
- Create a project and run
supabase/migrations/0001_init.sql(andsupabase/seed.sql) in the SQL editor. - Grant yourself admin:
select promote_user_to_admin('you@example.com'); - Enable Google/GitHub providers in Auth → Providers; add the OAuth callback URL
{PUBLIC_SITE_URL}/api/auth/callback. - Create an
event-coversstorage bucket (also created by the migration).
- Create a project and run
- Configure env:
cp .env.example .envand fill inPUBLIC_SUPABASE_URL,PUBLIC_SUPABASE_ANON_KEY,PUBLIC_SITE_URL. - Run
npm run dev(ornpx astro dev --background/stop/status/logs).
Commands
| Command | Action |
|---|---|
npm run dev |
Start dev server at localhost:4321 |
npm run build |
Build SSR output to ./dist/ |
npm run preview |
Preview the build locally |
npm run typecheck |
Type-check with astro check |
npx astro dev --background |
Background dev server (stop/status/logs) |
Deploy to Netlify
- Connect the repo to Netlify; build command
npm run build, publish directorydist. - Set
PUBLIC_SUPABASE_URL,PUBLIC_SUPABASE_ANON_KEY,PUBLIC_SITE_URLin Netlify env vars. netlify.tomladds security headers; the Netlify adapter emits the SSR function + redirects automatically.
Languages
TypeScript
50%
Astro
31.8%
CSS
11.9%
PLpgSQL
6%
JavaScript
0.3%