Skip to content

Nanofus/nuva

Repository files navigation

Nuva

This is a frontend + serverless API for a WordPress+ACF backend, with a bunch of features specialized for a Finnish fanfiction project. The eventual goal is to remove WordPress from the equation.

Might also be usable for other use cases, and as learning material, so feel free to fork and tinker.

Tech stack: SvelteKit, TypeScript, SASS, Kysely, Prisma, Postgres, AWS S3.

The production environment runs on Vercel. There's a couple of Vercel-specific things in the repo, which you should replace if not hosting in Vercel. These are:

  • svelte.config.js uses @sveltejs/adapter-vercel. Replace with @sveltejs/adapter-node or other adapter.
  • src/lib/server/api.ts connects to Postgres using @vercel/postgres, and can be directly replaced with node-postgres.
  • src/lib/util/config provides the main configuration through @vercel/edge-config, and can be replaced with a simple object. You can see the schema in src/lib/util/types.

Development

First, install dependencies with pnpm install (or other package manager).

If you're using Vercel, create a Postgres database and Edge Config store there, then add the credentials to .env. Note that the env variables need to have the VITE_ prefix.

Otherwise, host Postgres elsewhere (and update .env like above) and replace Edge Config with a config object in src/lib/util/config.ts (see schema in src/lib/util/types).

Populate the Postgres database with Prisma:

prisma db push

When this is done, start the development server:

turbo dev

Build

To create an production version of the app:

turbo build

About

SvelteKit-based frontend for a CMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published