Project Scaffolding
Recommended Directory Structure
The template ships with a minimal, working scaffold. Directories marked [add] are not included but represent the recommended layout as your app grows.
your-app/
├── manifest.yaml # App registration with Octostar
├── Dockerfile # Based on Octostar base image
├── build.sh # Build script (frontend + backend)
├── main.sh # Runtime entrypoint
├── requirements.txt # Backend Python dependencies
├── .env.example # Environment variable template
│
├── frontend/
│ ├── package.json # @octostar/platform-react + your deps
│ ├── tsconfig.json
│ ├── vite.config.ts
│ └── src/
│ ├── App.tsx # OctostarContextProvider + StateProvider root
│ ├── main.tsx # React DOM entry point
│ ├── state/
│ │ └── StateProvider.tsx # JWT initialization, app-wide state hooks
│ ├── services/
│ │ └── api.ts # Authenticated fetch wrapper (token management)
│ ├── utils/
│ │ └── env.ts # isStandalone() helper
│ ├── hooks/ # [add] Custom hooks
│ ├── features/ # [add] Feature-based components
│ ├── components/ # [add] Shared UI components
│ └── types/ # [add] TypeScript definitions
│
└── backend/
└── main.py # FastAPI app, serves frontend static files
Key Dependencies
Frontend (package.json):
{
"dependencies": {
"@octostar/platform-react": "^0.5.45",
"@octostar/platform-types": "^0.5.37",
"@octostar/platform-api": "^0.5.32",
"react": "^18.3.1",
"antd": "^5.x"
}
}
The template also includes a few example UI libraries (recharts, mermaid, etc.) that you can remove when building your own app.
Backend (requirements.txt):
fastapi>=0.115.0
uvicorn[standard]>=0.32.0
python-dotenv>=1.0.0
The Octostar Python SDK (octostar.client, octostar.utils.*) is not listed in requirements.txt — it comes pre-installed in the base Docker image.