Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ src/modules
out
dist
*.tgz

database.sqlite
# code coverage
coverage
*.lcov
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p align="center">
<p align="center">
<strong>A Lean Framework for Enterprise Scalability.</strong>
<strong>A lightweight, composable framework on Bun.</strong>
</br>
<i>"Complexity doesn't have to be heavy.</i></br>
<i>Built on <strong>Bun</strong>, designed for <strong>Logic</strong>, optimized for <strong>Scale</strong>."</i>
Expand Down Expand Up @@ -53,7 +53,7 @@
GamanJS currently only supports Bun runtime.

```bash
bun create gaman@latest
bun create gaman@latest <name>
```

## GamanJS Project Structure 🏗️
Expand All @@ -65,7 +65,11 @@ In a production scale or **Enterprise** project, the GamanJS folder structure wi
```
src/
├── index.ts # The Orchestrator (Entry Point)
├── database/ # Database Configuration
├── console/ # Helper tool for adding custom commands
├── database/ # Database Configuration
│ ├── models/ # Global model and schema databases
│ ├── migrations/ # Database migration files
│ └── seeders/ # Database seeders files
└── modules/ # Powerhouse of your Application
├── app/ # Infrastructure Module (Global/Shared)
│ ├── controllers/ # Handlers for Global Requests (Health, Index)
Expand All @@ -79,14 +83,14 @@ src/
│ └── UserController.ts
├── services/ # Business Logic (Auth Logic, User CRUD)
│ └── UserService.ts
├── models/ # Data Access Layer (Powered by @gaman/orm)
├── models/ # Data Access Layer (Powered by @gaman/db)
│ └── UserModel.ts
└── UserRouter.ts # Scoped Routes & Feature Middleware
```

## Documentation

visit our [https://gamanjs.github.io/](https://gamanjs.github.io/)
visit our [https://gaman.js.org/](https://gaman.js.org/)

## Star History

Expand All @@ -101,6 +105,7 @@ visit our [https://gamanjs.github.io/](https://gamanjs.github.io/)
## All contributors ✨

<a href="https://github.com/GamanJS/gaman/graphs/contributors"><img width="720" src="https://contrib.rocks/image?repo=GamanJS/gaman" alt="A table of avatars from the project's contributors" /></a>
<a href="https://github.com/GamanJS/gamanjs.github.io/graphs/contributors"><img width="720" src="https://contrib.rocks/image?repo=GamanJS/gamanjs.github.io" alt="A table of avatars from the project's contributors" /></a>

## Contributing

Expand Down
61 changes: 61 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,22 @@
"framework"
],
"scripts": {
"test-serv": "KAME_CLI=true bun src-test/index.ts",
"release": "bun build.ts && bun test && npm publish --access public",
"kame": "bun packages/kame/src/index.ts"
},
"devDependencies": {
"@types/bun": "latest",
"@types/pg": "^8.20.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"edge.js": "^6.5.0",
"esbuild-fix-imports-plugin": "^1.0.23",
"kysely": "^0.28.16",
"kysely-bun-sqlite": "^0.4.0",
"mysql2": "^3.22.2",
"pg": "^8.20.0",
"prettier": "^3.8.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
Expand Down
4 changes: 4 additions & 0 deletions packages/db/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src
test
node_modules
log
1 change: 1 addition & 0 deletions packages/db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @gaman/db
56 changes: 56 additions & 0 deletions packages/db/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "@gaman/db",
"version": "0.1.0",
"author": "angga7togk",
"license": "MIT",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./column": {
"types": "./dist/column/index.d.ts",
"require": "./dist/column/index.js",
"import": "./dist/column/index.mjs"
},
"./migration": {
"types": "./dist/migration/index.d.ts",
"require": "./dist/migration/index.js",
"import": "./dist/migration/index.mjs"
}
},
"keywords": [
"gamanjs",
"gaman",
"database",
"gaman db",
"orm",
"gaman orm",
"bun"
],
"repository": {
"url": "git+https://github.com/GamanJS/gaman.git"
},
"bugs": {
"url": "https://github.com/GamanJS/gaman/issues"
},
"scripts": {
"build": "tsc -b -v",
"clean": "tsc -b --clean"
},
"homepage": "https://github.com/GamanJS/gaman",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"peerDependencies": {
"kysely": ">=0.28.16",
"kysely-bun-sqlite": ">=0.4.0"
},
"devDependencies": {
"kysely": "^0.28.16",
"kysely-bun-sqlite": "^0.4.0"
}
}
8 changes: 8 additions & 0 deletions packages/db/src/column/base-column.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { ColumnDataType } from 'kysely';
import { ColumnDefinition } from './defintion-column';

export class BaseColumnBuilder {
protected create<T>(column: string, type: ColumnDataType) {
return new ColumnDefinition<T>(column, type);
}
}
Loading
Loading