Skip to content
Atelierby Alto Brio

Atelier · 0.7.0

Technical overview

See how Atelier handles requests and enforces access to team projects, where to add your business features and what running it requires.

How the application fits together

Stack in kit 0.7.0
ComponentVersion
Next.js16.4.1
React19.3.0
TypeScript6.0.3
Better Auth1.7.7
Kysely0.29.6
postgres.js3.4.9

Source layout

The repository contains:

src/
  app/            Pages, workspace screens and HTTP routes
  components/ui/  Shared UI components
  contracts/      Request and response schemas shared by server and browser
  server/         Access rules, data and service integrations
  styles/         Shared theme
  branding.ts     Application identity
db/migrations/    Database schema
tests/            Integration and Chromium workflows
docs/             Developer guides and references
scripts/          Diagnostics, verification and operating commands
.agents/skills/   Agent skills: kit-feature, kit-operate, kit-data-request
AGENTS.md         Shared agent instructions
CLAUDE.md         Claude Code entry point

Request flow

Better Auth handles email/password accounts, verification, recovery and team invitations. OAuth and SSO need implementation.

Frontend · browserReact interface and business screens
Backend · Next.js serverBetter Auth · accounts and teams
Your business logicExtend or replace project operations
Server-side permissions and plan checks
PostgreSQLAccounts, teams, projects and billing state
Background workerEmail delivery and subscription synchronization
Your external servicesResend · StripeConfigure for hosted use
Next.js serves both the React frontend and the HTTP backend. A separate worker reads pending jobs from PostgreSQL and calls Resend or Stripe.

On project creation, the HTTP handler validates the request and authenticates the user; a server transaction authorizes the write; the browser fetches updated workspace data the user may access.

Emails and Stripe events are recorded in PostgreSQL before the worker processes them, so they resume after an interruption. See the guide to the supplied application for its account, team and subscription behaviour.

How permissions are enforced

The server checks team membership before returning team data. Owners with an active plan create and archive projects; members read their team’s projects. Reads remain available when paid access ends. Other roles need implementation.

Enforcing the quota when requests arrive concurrently

Atelier’s local demo allows three active projects per team; hosted subscriptions use the quota configured for their Stripe offer. Creation, archiving and plan changes lock the same team row. The access check rereads current rights after acquiring that lock; the quota check and insert use the same transaction.

From createProjectInTransaction in src/server/projects-core.ts. projects.ts opens the transaction and holds it through commit or rollback.

  const [count] = await tx<{ count: number }[]>`SELECT count(*)::integer AS count
      FROM projects
      WHERE team_id = ${teamId} AND archived_at IS NULL`;
  if (!count || count.count >= team.project_limit)
    throw new AccessDenied(
      409,
      `Quota of ${team.project_limit} active projects reached. Archive a project to free up a slot.`,
      'quota_exhausted',
    );
  await tx`INSERT INTO projects (id, team_id, name, description)
      VALUES (${id}, ${teamId}, ${input.name}, ${input.description})`;
  return id;

The included integration scenario sends eight concurrent project-creation requests for an empty team, checking for three stored projects and five requests rejected for exceeding the quota.

Adapt Atelier to your business

The workspace frame keeps account, team and subscription controls around your business panel. Follow the UI guide to change the shared Tailwind CSS theme and editable shadcn/ui components built on Base UI.

The customization guide covers changes to roles, quotas and integrations. A feature that stores data spans its form, validation, migration, transaction and browser response.

Work directly or with a supervised agent

Define the expected user outcome, access rules and acceptance criteria. The supplied AGENTS.md and kit-feature skill guide implementation and checks; you review the code and working result.

The audit tracker example, separate from the supplied application, helps auditors prepare client updates. It reuses projects as audits and adds recommendations, priorities, statuses and calculated progress, retaining team isolation and plan checks.

The project due-date walkthrough follows a smaller Codex customization of kit 0.3.1 through implementation, review and tests.

Running and deploying

Source access

Your GitHub account needs two-factor authentication without SMS to access the private repository.

Start locally

Use Linux or macOS 13.5+, Node.js >=24.22.1 <25, npm 11 and a PostgreSQL 18 database accessible at 127.0.0.1 or localhost. Follow the local installation guide to run Atelier locally with fictional accounts, captured email and simulated billing. Try the demo to explore without installing it.

Configure services

You pay for hosting, a database, email, a domain and payment services. The deployment guide uses a Render web service and a background worker, both on the Starter plan by default, with PostgreSQL 18 and Resend; other hosts need adaptation. Neon is the reference database; other providers must meet the documented PostgreSQL requirements.

The Stripe integration supports flat-rate monthly or yearly subscriptions in one configured currency (EUR, USD, GBP, CAD or AUD), with either no tax or Stripe Tax added to tax-exclusive prices. Trials, coupons, seats, usage billing and tax-inclusive prices need additional implementation. Checkout creates subscriptions; the Customer Portal handles plan changes and cancellation.

Account erasure and backups

Atelier includes operator commands for account closure and erasure. Extend them to cover the data your features add. Atelier has no backup tool: backups and restoration use your database provider’s features.