# Oral surgery: knowledge base using Next.js

## Summary
A knowledge base blueprint for oral surgery built with Next.js on Ample. Domain schema includes:
- **Procedures**: extractions, implants, and corrective surgery
- **Pre-op instructions**: public preparation guidance
- **Post-op instructions**: public recovery guidance
- **Locations**: surgery locations
- **Asset versions**: versioned assets served from the CDN bucket.

Public information includes:
- Procedure catalog with recovery expectations
- Pre- and post-operative instructions
- Emergency contact per location.

## Technical Basis
The technical basis is verified on Next.js: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL alongside the app's public HTTPS URL.

## Framework, Workload, and Industry
- **Framework**: Next.js
- **Workload**: Knowledge base
- **Industry**: Oral surgery

## Prerequisites
1. A Next.js project (`next build` then `next start -H 0.0.0.0 -p $PORT` on the node-22 template)
2. Bucket credentials from `ample bucket create` passed as encrypted `S3_*` environment variables and a published bucket for public assets (`CDN_*`)
3. Review which oral surgery data classes may be handled; this blueprint models public information only.

## Workflow Steps
1. **Model the oral surgery domain**: Create tables for procedures, pre-op instructions, post-op instructions, locations, and asset versions.
2. **Workflow step 1**: Model articles and categories as tables keyed to the public catalog entities.
3. **Workflow step 2**: Build the site with versioned assets served from the CDN bucket.
4. **Workflow step 3**: Keep articles free of any sensitive data class.
5. **Workflow step 4**: Deploy and verify the public URL and the CDN asset URL.
6. **Deploy**: Use the command `ample deploy . --name  --public --env S3_ENDPOINT=...` to run the synchronous deploy.
7. **Verify**: Run self-test(s) using the command `ample logs  --kind build`.

## Cost Estimate
- **Monthly Amount**: $5.00 USD
- **Basis**: Size prices from `pricing.toml`.

## Limitations
- The oral surgery schema and workflow are an original design and were not executed as a separate application.
- No compliance claim is made for health, financial, privacy, or other issues. Only public guidance is included.

## Next Actions
- **Browse the catalog index**: `GET /v1/catalog`
- **Search published recipes by intent**: `POST /v1/catalog/search`
- **Prepare a side-effect-free deployment plan**: `POST /v1/catalog/plan`.
