Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

publish-npm:
name: Publish npm package (requires approval)
if: needs.prepare.outputs.PROJECT == 'phantom-api'
if: needs.prepare.outputs.PROJECT == 'phantom-api-client'
runs-on: ubuntu-latest
needs: [prepare, build]
environment: release # configure environment protection to require manual approval
Expand All @@ -91,10 +91,12 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Enable Corepack and Yarn 4
run: corepack enable && corepack prepare yarn@4.9.2 --activate
- name: Install dependencies
run: yarn install --immutable
- name: Build package
run: yarn workspace phantom-api build
run: yarn workspace ${{ needs.prepare.outputs.PROJECT }} build
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
103 changes: 55 additions & 48 deletions .pnp.cjs
100755 → 100644

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ COPY phantom-api-backend/ ./phantom-api-backend/
COPY admin-interface/ ./admin-interface/

# Build des projets nécessaires à l'image
ENV NODE_OPTIONS="--experimental-loader=./.pnp.loader.mjs"
# Utilise un chemin absolu pour le loader PnP, car les scripts workspace
# s'exécutent depuis le dossier du package (sinon ./ pointe vers le workspace)
ENV NODE_OPTIONS="--experimental-loader=/app/.pnp.loader.mjs"
RUN yarn workspace phantom-api-backend build \
&& yarn workspace admin-interface build

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

A dynamic backend system that automatically creates API endpoints, database tables, and validation schemas based on api call from frontend.

[Complete Documentation](https://salnika.github.io/phantom-api.dev/)

## Features

- **Dynamic API**: Single route `/api/:resource/:action` handles all operations
Expand All @@ -42,9 +44,6 @@ A dynamic backend system that automatically creates API endpoints, database tabl
│ └── data/ # SQLite database files
├── admin-interface/ # admin (React admin panel)
├── phantom-api/ # client (NPM package for frontend integration)
├── demo/ # Vite React demo application
├── website/ # Marketing website
├── public-doc/ # MkDocs documentation
├── ecosystem.config.js # PM2 process configuration
├── Dockerfile # Backend containerization
└── docker-compose.yml # Multi-service orchestration
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dotenv": "^17.0.1",
"knip": "^5.61.3",
"oxlint": "^1.0.0",
"phantom-api": "workspace:*",
"phantom-api-client": "workspace:*",
"syncpack": "^13.0.4",
"typedoc": "^0.28.7",
"typedoc-plugin-markdown": "^4.7.0",
Expand Down Expand Up @@ -41,4 +41,4 @@
"admin-interface",
"public-doc"
]
}
}
2 changes: 1 addition & 1 deletion phantom-api-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"pino": "^9.7.0",
"pino-pretty": "^13.0.0",
"redis": "^4.7.0",
"zod": "^3.23.8"
"zod": "^3.25.76"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.6.3",
Expand Down
2 changes: 1 addition & 1 deletion phantom-api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "phantom-api",
"name": "phantom-api-client",
"version": "0.2.0-alpha",
"bin": {
"phantom-migration": "dist/migration-cli.js",
Expand Down
41 changes: 24 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6037,46 +6037,46 @@ __metadata:
typedoc-plugin-markdown: "npm:^4.7.0"
typescript: "npm:^5.8.3"
vitest: "npm:^3.2.4"
zod: "npm:^3.23.8"
zod: "npm:^3.25.76"
languageName: unknown
linkType: soft

"phantom-api-monorepo@workspace:.":
"phantom-api-client@workspace:*, phantom-api-client@workspace:phantom-api":
version: 0.0.0-use.local
resolution: "phantom-api-monorepo@workspace:."
resolution: "phantom-api-client@workspace:phantom-api"
dependencies:
"@changesets/cli": "npm:^2.29.5"
"@types/bcrypt": "npm:^5.0.2"
"@types/node": "npm:^24.0.9"
bcrypt: "npm:^6.0.0"
axios: "npm:^1.10.0"
chalk: "npm:^4.1.2"
dotenv: "npm:^17.0.1"
commander: "npm:^12.0.0"
knip: "npm:^5.61.3"
oxlint: "npm:^1.0.0"
phantom-api: "workspace:*"
syncpack: "npm:^13.0.4"
typedoc: "npm:^0.28.7"
typedoc-plugin-markdown: "npm:^4.7.0"
typescript: "npm:^5.8.3"
bin:
phantom-migration: dist/migration-cli.js
phantom-seed: dist/seed-cli.js
languageName: unknown
linkType: soft

"phantom-api@workspace:*, phantom-api@workspace:phantom-api":
"phantom-api-monorepo@workspace:.":
version: 0.0.0-use.local
resolution: "phantom-api@workspace:phantom-api"
resolution: "phantom-api-monorepo@workspace:."
dependencies:
"@changesets/cli": "npm:^2.29.5"
"@types/bcrypt": "npm:^5.0.2"
"@types/node": "npm:^24.0.9"
axios: "npm:^1.10.0"
bcrypt: "npm:^6.0.0"
chalk: "npm:^4.1.2"
commander: "npm:^12.0.0"
dotenv: "npm:^17.0.1"
knip: "npm:^5.61.3"
oxlint: "npm:^1.0.0"
phantom-api-client: "workspace:*"
syncpack: "npm:^13.0.4"
typedoc: "npm:^0.28.7"
typedoc-plugin-markdown: "npm:^4.7.0"
typescript: "npm:^5.8.3"
bin:
phantom-migration: dist/migration-cli.js
phantom-seed: dist/seed-cli.js
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -8245,9 +8245,16 @@ __metadata:
languageName: node
linkType: hard

"zod@npm:^3.22.4, zod@npm:^3.23.8":
"zod@npm:^3.22.4":
version: 3.25.74
resolution: "zod@npm:3.25.74"
checksum: 10c0/59e38b046ac333b5bd1ba325a83b6798721227cbfb1e69dfc7159bd7824b904241ab923026edb714fafefec3624265ae374a70aee9a5a45b365bd31781ffa105
languageName: node
linkType: hard

"zod@npm:^3.25.76":
version: 3.25.76
resolution: "zod@npm:3.25.76"
checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c
languageName: node
linkType: hard