Getting Started
Project Structure
Understand the file organization of a NovaServe project including App.ts, nova.config.ts, and route handlers.
NovaServe projects follow a clean layout where application code and infrastructure definitions coexist in the same TypeScript codebase.
Standard Directory Layout
Project Structure
my-nova-app/
├── App.ts # Main application & resource definitions
├── nova.config.ts # Compiler & deployment configuration
├── src/
│ ├── routes/ # Route handlers & controller logic
│ ├── services/ # Business logic & external API clients
│ └── models/ # TypeScript interfaces & database schemas
├── .nova/
│ └── state.json # SHA-256 deployment state lock (auto-generated)
├── package.json
└── tsconfig.jsonThe App.ts Entrypoint
App.ts is the primary entrypoint where you declare your application and all cloud resources. The NovaServe compiler starts AST parsing from this file.
App.ts
import { defineApp, api, storage, queue } from "novaserve";
export const app = defineApp({
name: "my-nova-app",
region: "us-east-1",
});
export const uploads = storage("user-uploads");
export const taskQueue = queue("background-tasks");
export const createTask = api.post("/tasks", async (req) => {
const task = await req.json();
await uploads.put(`task-${task.id}.json`, JSON.stringify(task));
await taskQueue.push(task);
return { status: "created" };
});The nova.config.ts File
nova.config.ts controls how NovaServe compiles and deploys your codebase. It configures the target cloud provider, region, compiler options, and state backend.
nova.config.ts
import { defineConfig } from "novaserve/config";
export default defineConfig({
project: "my-nova-app",
target: "aws",
aws: {
region: "us-east-1",
architecture: "arm64",
memorySize: 512,
},
});The .nova/ Directory
After your first deployment, NovaServe creates a .nova/ directory containing:
- state.json — SHA-256 state lock with deployment checksums
- ir.json — compiled Nova IR output (when using
nova compile --out)
The state file should be committed to version control so that nova driftcan detect out-of-band changes.
Next Steps
- Configuration Reference — all
nova.config.tsoptions - Compiler Pipeline — how AST parsing transforms your code