Backend hardening + API v1 + unit test + CI - #21
Open
caya8205-2 wants to merge 13 commits into
Open
Conversation
…enerin tombol cancel + routing hooks tengs
….com/yudha556/planify into implement-engine
- ai engine rework - endpoint baru buat History + My Project page - table sql baru di supabase buat kedua page diatas - implementasi dan integrasi db dan engine ke FE - wm rework di preview page - output rework di preview page - preview gabisa di copas ataupun di donglot jadi mantap - diagram issue dengan mermaid = fixed - next gw bakal integrasi db ke coins sama user, biar ga welcome dr maya mulu
- endpoint baru 'GET /api/user/me' buat data user - fix endpoint coins yg ngawur gara2 ai, sekarang udh sesuai format response nya dengan yg di db, jadi konsisten dibungkus dalem object 'data'. - ganti component2 yg masih hardcoded jadi data beneran.
- Rate limiting on all routes, stricter on auth endpoints - Helmet security headers (CSP, HSTS, clickjacking protection) - XSS sanitization and HTTP parameter pollution guard - Zod request validation on auth, projects, AI, and export endpoints - CORS restricted to configured frontend origin - JWT secret enforced in production - Token blacklist backed by Redis with in-memory fallback - Structured JSON logging with request IDs - Request body size limited to 1MB - Swagger/OpenAPI docs at /api/docs - All endpoints versioned under /api/v1, legacy /api kept as deprecated
- 40 Vitest unit tests for web-api (Zod validators, middlewares, token blacklist) - pnpm test runnable from repo root via turbo run test - Restructure API-Endpoint-Docs with accurate v1 section and legacy section
- Add test.yml workflow (install, check-types, unit tests) - Add check-types script to web-api covering src and tests - Add check-types alias to web-app for uniform turbo task - Fix missing mermaid type declarations in web-app
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
gabisa gw merge langsung gara2 CI vercel gagal, tolong merge bos @yudha556 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ringkasan
ngelanjutin dari sini karna ini branch yg punya commit terbaru
Yang masuk di PR ini:
/api/v1/api/docsCatatan
endpoint lama
/api/...masih ttp jalan karena FE sekarang belum di migrate ke/api/v1klo mau langsung pake API versi baru, tinggal set di env:
NEXT_PUBLIC_API_URL→.../api/v1Testing
pnpm check-types✅pnpm test→ 40/40 pass ✅Ada satu type error lama di
web-appyang sekalian dibenerin karena sekarang ikut kena typecheck CI (mermaid types).