Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.git
.github
.env
.next
.env*
.svelte-kit
backend
build
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
/coverage

# framework output
/.next/
/.svelte-kit/
/out/

# production
/build
Expand All @@ -30,12 +28,8 @@ yarn-error.log*
.env*.local
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.idea
/backend/
Expand Down
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,60 @@
# MethodConf

The MethodConf frontend is being migrated to SvelteKit. This branch only contains the temporary SvelteKit shell and tooling base. The old Next.js source stays in the repo as reference until the page migration layers replace it.

The Umbraco CMS lives in [`sgfdevs/cms.methodconf.com`](https://github.com/sgfdevs/cms.methodconf.com).
The MethodConf frontend uses Svelte 5 and SvelteKit 3. Server-rendered conference pages, schedules, speakers, sponsors, and registration content come from the [Umbraco CMS](https://github.com/sgfdevs/cms.methodconf.com). Static assets and self-hosted fonts live in `static/`; CMS media uses the streaming proxy and image optimizer.

## Local development

1. Copy `.env.example` to `.env` when working on routes that need CMS or newsletter configuration.
2. Install dependencies and start the development server:
Use the Node version in `.nvmrc`. Copy `.env.example` to `.env`, configure your local CMS, then run:

```bash
npm ci
npm run dev
```

Useful checks for this foundation layer:
Vite prints the development URL. To check the app:

```bash
npm run lint
npm run check
npm run test
npm test
```

`npm test` runs unit tests, builds the app, and checks routes against local CMS and newsletter fixtures. `npm run test:unit` runs only unit tests.

## Runtime configuration

SvelteKit reads the private server variables declared in `src/env.ts` at runtime. Do not expose them through public environment variables.

- `UMBRACO_BASE_URL` must point to the Umbraco API used by page loaders and the media proxy.
- `CMS_PUBLIC_URL` is the public CMS URL for the `/umbraco/` redirect.
- `SITE_URL` is the canonical frontend URL, including its scheme.
- `SEARCH_INDEXING_ENABLED=true` allows indexing. Any other value disables it.
- `NEWSLETTER_ENDPOINT` and `NEWSLETTER_LIST_ID` configure the server-side newsletter subscription request. Without both, subscriptions return a configuration error. For local work, use a fake local endpoint and list ID so form submissions cannot reach the live service.

Keep credentials in local environment files or deployment configuration, not in Git. Production Node processes need these variables in their environment; `npm start` does not load `.env` automatically.

## Production and Docker

```bash
npm run build
npm start
```

The production smoke image can be built locally with:
The Node adapter writes the server and assets to `build/`. Set `HOST` and `PORT` for the listener and `ORIGIN` when needed behind a reverse proxy. These adapter settings are separate from the canonical `SITE_URL`.

```bash
docker build -t methodconf.com .
docker run --rm --env-file .env -p 3000:3000 methodconf.com
```

The Dockerfile builds the app, installs production dependencies, and runs `node build` as a non-root user on port 3000. Environment files stay outside the image. The `frontend-prod` Compose profile loads `.env`; `APP_PORT` controls the host port. The `frontend-dev` profile mounts the project for development commands inside the container.

## Umbraco schemas

With `UMBRACO_BASE_URL` pointing to the intended CMS, run:

```bash
npm run generate:umbraco-api-client
```

The script reads the delivery and default OpenAPI schemas and writes `src/lib/umbraco/deliveryApiSchema.d.ts` and `src/lib/umbraco/defaultApiSchema.d.ts`. Commit schema changes when the CMS contract changes.
9 changes: 0 additions & 9 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,11 @@ import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'.next/**',
'.svelte-kit/**',
'build/**',
'coverage/**',
'node_modules/**',
'next-env.d.ts',
'next.config.ts',
'src/app/**',
'src/components/**',
'src/config.ts',
'src/data/**',
'src/lib/umbraco/*ApiSchema.d.ts',
'src/serverConfig.ts',
'src/util.ts',
],
},
js.configs.recommended,
Expand Down
13 changes: 0 additions & 13 deletions next.config.ts

This file was deleted.

37 changes: 0 additions & 37 deletions src/app/[conference]/[...slug]/layout.tsx

This file was deleted.

93 changes: 0 additions & 93 deletions src/app/[conference]/[...slug]/page.tsx

This file was deleted.

76 changes: 0 additions & 76 deletions src/app/[conference]/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/[conference]/register/layout.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions src/app/[conference]/register/page.tsx

This file was deleted.

Loading
Loading