This directory contains example projects demonstrating how to use aisanity with different programming languages and frameworks. Each example includes proper devcontainer configuration for seamless sandboxed development.
A simple Go web application with health check endpoints.
Features:
- Go 1.21 with proper module setup
- HTTP server with multiple endpoints
- Devcontainer with Go tools and VS Code extensions
- Pre-configured development environment
Quick Start:
cd go-hello-world
aisanity init
aisanity run go run main.goA simple Flask REST API with Python 3.11.
Features:
- Flask web framework
- RESTful API endpoints
- Python virtual environment
- Devcontainer with Python tools
- Pre-configured development environment
Quick Start:
cd python-flask-api
aisanity init
aisanity run python app.pyA TypeScript REST API with Express.js framework.
Features:
- TypeScript with strict type checking
- Express.js web framework
- RESTful API endpoints
- Jest testing framework setup
- Pre-configured development environment
Quick Start:
cd node-typescript-api
aisanity init
aisanity run npm run devA high-performance TypeScript REST API using Bun runtime.
Features:
- Blazing fast Bun runtime
- Native TypeScript support (no transpilation)
- Zero runtime dependencies (no Express needed)
- Bun.serve() native HTTP server
- Built-in hot reload and testing
- 4x faster startup than Node.js
Quick Start:
cd bun-typescript-api
aisanity init
aisanity run bun run devFor any example project:
-
Navigate to the example:
cd examples/<project-name>
-
Initialize aisanity:
aisanity init
-
Run the application:
aisanity run <command>
-
Check status:
aisanity status
-
Stop containers:
aisanity stop
Each example includes:
- Proper devcontainer.json - Configured for the specific language/framework
- Dockerfile - Optimized container setup
- VS Code extensions - Language-specific development tools
- Port forwarding - Automatic port exposure for web applications
- Post-create commands - Automatic dependency installation
To add a new example:
- Create a new directory under
examples/ - Add a
.devcontainer/folder with:devcontainer.jsonDockerfile(optional, can use pre-built images)
- Include language-specific configuration files
- Add a comprehensive README.md
- Update this main README.md
- Keep examples simple - Focus on demonstrating core concepts
- Include proper documentation - Clear setup and usage instructions
- Test with aisanity - Ensure examples work with the tool
- Use latest stable versions - Keep dependencies up to date
- Include health checks - Make it easy to verify the application is running
When adding new examples:
- Follow the established directory structure
- Include both aisanity and manual development instructions
- Test thoroughly with
aisanity run,aisanity status, andaisanity stop - Update this README with the new example
If you encounter issues with any example:
- Check that devcontainers CLI is installed
- Verify Docker is running
- Try
aisanity statusto check container state - Use
aisanity stopto clean up and retry