# system-windsurf **Repository Path**: aicode-design/system-windsurf ## Basic Information - **Project Name**: system-windsurf - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-08 - **Last Updated**: 2024-12-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Role-Based Access Control (RBAC) System A comprehensive Role-Based Access Control system built with Spring Boot (Java/Kotlin) and React, providing a secure and flexible user management solution. ## Project Structure ``` system-windsurf/ ├── backend/ │ └── jvm/ │ └── spring-boot/ │ ├── java-maven/ # Java implementation with Maven │ ├── java-gradle/ # Java implementation with Gradle │ ├── kotlin-maven/ # Kotlin implementation with Maven │ └── kotlin-gradle/ # Kotlin implementation with Gradle └── frontend/ ├── react-app/ # React implementation └── vue-app/ # Vue implementation ``` ## Features - User Management - Create, Read, Update, Delete (CRUD) operations - User authentication and authorization - Password encryption - Email verification (optional) - Role Management - Create and manage roles - Assign/revoke permissions to roles - Hierarchical role structure - Permission Management - Fine-grained permission control - Resource-based permissions - Action-based permissions (Create, Read, Update, Delete) - Security - JWT-based authentication - Password hashing with BCrypt - CORS configuration - Spring Security integration ## Technology Stack ### Backend - Spring Boot 3.2.1 - Spring Security - Spring Data JPA - JWT Authentication - H2 Database (can be replaced with PostgreSQL/MySQL) - Maven/Gradle build tools - Java 17/Kotlin 1.9.21 ### Frontend - React 18.2.0 with Vite - Ant Design UI Components - Zustand for State Management - Axios for API calls - React Router for routing ## Getting Started ### Prerequisites - JDK 17 or later - Node.js 16 or later - npm or yarn ### Backend Setup #### Using Maven (Java/Kotlin) ```bash cd backend/jvm/spring-boot/[java|kotlin]-maven ./mvnw spring-boot:run ``` #### Using Gradle (Java/Kotlin) ```bash cd backend/jvm/spring-boot/[java|kotlin]-gradle ./gradlew bootRun ``` ### Frontend Setup #### React Application ```bash cd frontend/react-app npm install npm run dev ``` The application will be available at: - Backend: http://localhost:8080 - Frontend: http://localhost:3000 ## API Documentation ### Authentication Endpoints - POST /api/auth/login - User login - POST /api/auth/register - User registration - POST /api/auth/logout - User logout ### User Management - GET /api/users - List all users - GET /api/users/{id} - Get user details - POST /api/users - Create new user - PUT /api/users/{id} - Update user - DELETE /api/users/{id} - Delete user ### Role Management - GET /api/roles - List all roles - GET /api/roles/{id} - Get role details - POST /api/roles - Create new role - PUT /api/roles/{id} - Update role - DELETE /api/roles/{id} - Delete role ### Permission Management - GET /api/permissions - List all permissions - GET /api/permissions/{id} - Get permission details - POST /api/permissions - Create new permission - PUT /api/permissions/{id} - Update permission - DELETE /api/permissions/{id} - Delete permission ## Security Considerations - All endpoints except authentication endpoints require JWT token - Passwords are hashed using BCrypt - CORS is configured for frontend access - Role-based access control is enforced on all endpoints - Input validation is implemented for all requests ## Development ### Code Style - Java/Kotlin: Follow Google Java Style Guide - React: Follow Airbnb React/JSX Style Guide ### Testing - Backend: JUnit 5 with Spring Boot Test - Frontend: Jest with React Testing Library ## Contributing 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.