Files
Rayyan 7ce0de4e91 feat(identity): redesign identity module and introduce RBAC foundation
- Redesign the Identity module with a richer domain model.
- Extend the User entity to support username, Authentik integration, activity tracking, and storage information.
- Add Role and Permission domain models with many-to-many relationships.
- Implement RBAC foundation using UserRole, RolePermission, and UserPermission mappings.
- Add user storage quota and usage fields with default values.
- Introduce Authentik identifiers and synchronization metadata.
- Refactor user domain logic for role and permission management.
- Update Prisma schema to support the new identity architecture.
- Improve JWT authentication and permission guard integration.
- Update repositories, handlers, controllers, mappers, DTOs, and Swagger configuration.
- Refresh environment configuration and project dependencies.
2026-08-02 00:25:36 +07:00

46 lines
1.3 KiB
Plaintext

Note :
- pastikan berada di branch yang benar.
-
Requirement :
- Node.js 22 LTS
Step :
1. jalankan "NPM Install".
2. generate prisma client "npx prisma generate".
3. jalankan "cp env.example env" atau buat file .env baru.
4. sesuaikan isi dari .env
Run Server :
- npm run start:dev
Command Dev :
- npm test
- npm run lint
- npm run format
- npx prisma studio {untuk cek db}
Test API :
- menggunakan postman :
arahkan ke file /postman/RayLab.postman_collection.json
- menggunakan swagger :
- masuk ke http://localhost:port/apilist
- klik authorize dan masukkan jwt token
Controller Requirement :
- diatas deklarasi class controller pastikan ada ini :
- @ApiTags('object')
- @Controller('object')
- @UseGuards(JwtAuthGuard, PermissionGuard)
- diatas deklarasi method controller pastikan ada ini :
- tipe api : @Post(), @Get(':id'), @Patch(':id'), @Delete(':id')
- @Permissions(PermissionType.SOMETHING)
- @ApiOperation({ summary: 'penjelasan singkat api' })
Table :
- untuk table akan dibuat otomatis oleh schema.prisma, disana hanya perlu ditambahkan model atau diubah, jalankan commandnya, setelah itu otomatis tablenya dibuat
- command : npx prisma migrate dev --name {Nama Perubahan}
Use case:
- penentuan use case ditentukan siapa pemiliknya dahulu, dan harus konsisten.