@rio.js/enterprise
v1.4.9
Published
Enterprise SaaS platform service built with Elysia and Bun.
Readme
Enterprise Service
Enterprise SaaS platform service built with Elysia and Bun.
Getting Started
Prerequisites
- Bun installed (latest version)
Installation
bun installDevelopment
Start Development Server
bun run devThe server will start on http://localhost:3001 (check src/index.ts for the port).
Run Tests
# Run all tests
bun test
# Run tests in watch mode
bun test:watchProject Structure
src/
├── database/ # Database schemas and configuration
│ ├── domains/ # Domain-specific table definitions
│ └── utils.ts # Database utilities
├── modules/ # Feature modules
│ ├── subscriptions/ # Subscription management
│ └── organizations/ # Organization management
├── utils/ # Shared utilities
│ └── errors.ts # Custom error handling
└── index.ts # Application entry pointTesting
We use Bun's built-in test runner. All tests should be written in TypeScript with the .test.ts suffix.
Writing Tests
See CONTRIBUTING.md for detailed testing guidelines.
Example:
import { describe, expect, it } from "bun:test"
describe("Feature", () => {
it("should work correctly", () => {
expect(true).toBe(true)
})
})Contributing
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Error Handling
This project uses a custom error handling system. See src/utils/errors.ts for details.
All modules should:
- Create error classes using
createErrorClasses - Register errors with Elysia
- Handle errors in
.onError()hook - Throw custom errors in business logic
License
[Add your license here]
