Files

3.7 KiB

Journaley

Journaley is a simple, modern journaling app built with SvelteKit, Tailwind CSS, shadcn-svelte conventions, Convex, and Convex Auth.

Features

  • Authenticated daily markdown entries with live Convex data.
  • Dashboard with recent entries, streaks, activity, mood counts, and tag insights.
  • Entry workspace with create/edit dialog, markdown preview, date, mood, pin/archive state, tags, search, filters, and sorting.
  • Normalized tagging with usage counts and entry/tag joins.
  • Convex full-text search over title, body text, mood, and tags.
  • Warm light theme, dark mode, and basic user settings.

Development

Install dependencies:

pnpm install

Push Convex functions and regenerate types:

CONVEX_AGENT_MODE=anonymous npx convex dev --once

Start the SvelteKit app:

pnpm dev

The local app runs at http://localhost:5173. Convex local deployment values live in .env.local.

Production App

This app uses @sveltejs/adapter-node, so production builds create a Node server in build/.

Set these environment variables in your production app host before building and running:

PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud
PUBLIC_CONVEX_SITE_URL=https://your-production-deployment.convex.site
HOST=0.0.0.0
PORT=3000

Build and validate the production app:

pnpm prod:check

Build only:

pnpm build

Run the production server:

pnpm start

For a single local smoke test that builds and starts the production server:

pnpm prod

Docker Deployment

The root Dockerfile builds the SvelteKit Node server with pnpm and runs it with node build.

Build locally:

docker build \
  --build-arg PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud \
  --build-arg PUBLIC_CONVEX_SITE_URL=https://your-production-deployment.convex.site \
  -t journaley .

Run locally:

docker run --rm -p 3000:3000 \
  -e PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud \
  -e PUBLIC_CONVEX_SITE_URL=https://your-production-deployment.convex.site \
  -e HOST=0.0.0.0 \
  -e PORT=3000 \
  journaley

For Dokploy, choose a Dockerfile deployment, keep the Dockerfile path as Dockerfile, expose container port 3000, and set the same environment variables in the Dokploy app settings. The public Convex URLs are also defined as Docker build args because SvelteKit's public static env values are compiled into the app during the image build.

Auth

This project uses Convex Auth with email/password for local development. The initializer created convex/auth.config.ts, convex/auth.ts, and convex/http.ts; the frontend uses @mmailaender/convex-auth-svelte for SvelteKit auth state and auth routes.

For production Convex Auth, make sure your production Convex deployment has its auth environment configured, including SITE_URL, JWT_PRIVATE_KEY, and JWKS. If sign-in returns a generic Convex server error, production auth keys/site URL are the first things to verify.

Scripts

  • pnpm dev starts SvelteKit.
  • pnpm build builds the app.
  • pnpm start runs the built Node server from build/.
  • pnpm prod builds and starts the production server locally.
  • pnpm prod:check runs checks, linting, and a production build.
  • pnpm preview previews the production build.
  • pnpm check runs Svelte and TypeScript checks.
  • pnpm lint runs Prettier checks and ESLint.
  • pnpm format formats the codebase.

Project Layout

  • convex/ contains schema, auth, entries, tags, settings, and analytics functions.
  • src/routes/ contains SvelteKit pages and layout.
  • src/lib/components/ contains reusable UI, logo, theme, and markdown components.
  • static/favicon.svg contains the Journaley mark.