https://github.com/untangledfinance/untangled-web
A framework to build web applications in Untangled platform.
https://github.com/untangledfinance/untangled-web
bun framework ioc lib nodejs npm package typescript web
Last synced: 3 days ago
JSON representation
A framework to build web applications in Untangled platform.
- Host: GitHub
- URL: https://github.com/untangledfinance/untangled-web
- Owner: untangledfinance
- Created: 2025-05-24T11:55:30.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-12-15T16:13:17.000Z (4 months ago)
- Last Synced: 2025-12-18T07:33:54.182Z (4 months ago)
- Topics: bun, framework, ioc, lib, nodejs, npm, package, typescript, web
- Language: Python
- Homepage: https://npmjs.com/package/untangled-web
- Size: 4.51 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Untangled Web
A TypeScript-based backend framework for building web applications in the Untangled Finance platform.
## Features
- **Bun.serve HTTP Server** - High-performance embedded HTTP server powered by Bun
- **Decorator-Based Configuration** - IoC container with `@Module`, `@Controller`, `@Bean` decorators
- **Request Handling** - Full support for JSON, form-urlencoded, text, and multipart/form-data
- **File Uploads** - Built-in multipart parsing with `UploadedFile`, `FileReq`, and `AuthFileReq` types
- **Filters/Middleware** - Request interceptors for auth, logging, rate limiting, validation
- **CORS Support** - Built-in CORS handling with preflight support
- **Database Connectors** - MongoDB and PostgreSQL support
- **Caching & Queuing** - Redis-based caching and queue systems
- **Scheduled Jobs** - Cron-based job scheduling with `@Job` and `@Cron` decorators
- **JWT Authentication** - Built-in JWT support with RBAC via `@Auth` decorator
## Getting Started
The library has been published in the NPM registry as well as in GitHub Packages. To get started with Untangled Web, install it using Bun:
```sh
bun add untangled-web
```
### Quick Example
```typescript
import {
Application,
Controller,
FileReq,
Get,
Module,
Post,
Req,
} from 'untangled-web';
@Controller('/api')
class ApiController {
@Get('/hello')
hello() {
return { message: 'Hello, World!' };
}
@Post('/upload')
upload(req: FileReq<{ name: string }>) {
const files = req.files;
return { uploaded: files.length, name: req.body.name };
}
}
@Module({ controllers: [ApiController] })
class App extends Application {
async main() {
await this.start({ host: '0.0.0.0', port: 3000 });
}
}
new App().main();
```
## Examples
You can take a look at the available [examples](/examples/) to explore framework features:
- **web-app** - Comprehensive example with HTTP endpoints, file uploads, CORS, and filters.
- Use this [starter](https://github.com/untangledfinance/untangled-web-starter) as a template to start building your web applications.
## Runtime
- **Runtime**: Bun (required)
- This is a Bun-native platform
## Documentation
See [LLM_AGENT_GUIDE.md](/LLM_AGENT_GUIDE.md) for detailed framework documentation (used as LLM agents' initial knowledge) including:
- Architecture principles and IoC container
- HTTP decorators and routing
- Database connectors (MongoDB, PostgreSQL)
- Caching, queuing, and pub-sub
- Authentication and authorization
- File uploads and storage
- Scheduled jobs
## License
MIT