next js.md

Tutoring centers: member portal using Next.js

Summary

A member portal blueprint for tutoring centers built with Next.js on Ample. Domain schema:

Public information: subjects and levels, schedule and locations, tutor qualifications. Kept out of scope until handling is reviewed: minor students and guardian identity, progress reports.

Infrastructure requirements

Prerequisites

Steps

  1. Model the tutoring centers domain. Create the tables course_groups, memberships, sessions, materials, document_access. Tutoring groups lives in course_groups; keep the sensitive classes (minor students and guardian identity, progress reports) out of this schema.

  2. Workflow step 1. Model groups, memberships and roles

  3. Workflow step 2. Authorize access to materials by membership and role (401, 403 negative tests)

  4. Workflow step 3. Store materials in the private bucket and stream them through the app

  5. Workflow step 4. Deploy and verify the negative tests and an authorized download

    ample deploy . --name <app-name> --public --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=...
    
  6. Verify. Run the pattern self-test(s) from the example (/p/private-document-library) and your own acceptance checks for the tutoring centers workflow.

    ample logs <deployment_id> --kind build
    

Tested examples

Cost estimate

Estimated 10.00 USD per month (size prices from pricing.toml at build revision a1b8c38919e59cd035ebabaced73cf84ece24371).

Always-on monthly price of the tested sizes; apps and databases auto-pause when idle. Buckets are allocation-priced per quota and not included.

Verification evidence

Last verified: 2026-09-21T02:34:39Z

Input schema

{
  "additionalProperties": false,
  "properties": {
    "env": {
      "description": "Encrypted environment variables",
      "items": {
        "pattern": "^[A-Z][A-Z0-9_]*=.*$",
        "type": "string"
      },
      "maxItems": 50,
      "type": "array"
    },
    "name": {
      "description": "App name",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9-]+$",
      "type": "string"
    },
    "path": {
      "description": "Project directory or ample.toml service",
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    },
    "release_command": {
      "description": "Migration command run before activation",
      "maxLength": 512,
      "type": "string"
    }
  },
  "required": [
    "env",
    "name",
    "path"
  ],
  "type": "object"
}