{"id":19776284,"url":"https://github.com/geo-tp/autocrud","last_synced_at":"2025-08-24T01:11:36.835Z","repository":{"id":259410435,"uuid":"877355670","full_name":"geo-tp/AutoCrud","owner":"geo-tp","description":"API Rest to automatically generates and manages CRUD operations for custom data structures defined by users","archived":false,"fork":false,"pushed_at":"2024-11-14T17:49:37.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T11:58:12.559Z","etag":null,"topics":["crud","data-structures","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geo-tp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T14:07:15.000Z","updated_at":"2025-01-03T12:23:02.000Z","dependencies_parsed_at":"2025-02-28T05:50:37.591Z","dependency_job_id":"7bb8097d-1675-4ce7-98c5-2bf5faa04f97","html_url":"https://github.com/geo-tp/AutoCrud","commit_stats":null,"previous_names":["geo-tp/autocrud"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geo-tp/AutoCrud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geo-tp%2FAutoCrud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geo-tp%2FAutoCrud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geo-tp%2FAutoCrud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geo-tp%2FAutoCrud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geo-tp","download_url":"https://codeload.github.com/geo-tp/AutoCrud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geo-tp%2FAutoCrud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778236,"owners_count":24819265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud","data-structures","rest-api"],"created_at":"2024-11-12T05:19:21.787Z","updated_at":"2025-08-24T01:11:36.808Z","avatar_url":"https://github.com/geo-tp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=geo-tp_AutoCrud\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=geo-tp_AutoCrud)\n\n# AutoCRUD\n\nAutoCRUD is a Spring Boot-based REST API that automatically generates and manages CRUD operations for custom data structures defined by users. It allows users to define custom fields, channels, and entries, and easily manage authentication and ownership checks for secure data manipulation.\n\n## REST API Endpoints\n\n### Authentication\n\n#### `POST /api/auth/login`\n\nAllows users to log in and retrieve a token for subsequent requests.\n- **Request Body**: `LoginRequestDTO` containing `email` and `password`.\n- **Response**: `LoginResponseDTO` containing an authentication token.\n\n### User Management\n\n#### `POST /api/users/create`\n\nCreates a new user with the specified email, password, and optional roles.\n- **Parameters**:\n  - `email` (required): The email address of the user.\n  - `password` (required): The password for the user.\n  - `roles` (optional): A list of roles for the user. Defaults to `ROLE_USER` if not provided.\n\n### Channels\n\n#### `POST /api/channels/create`\n\nCreates a new channel based on the given information.\n- **Request Body**: `ChannelDTO` containing channel details.\n- **Response**: `ChannelDTO` representing the created channel.\n\n#### `GET /api/channels/{id}`\n\nFetches the details of a channel by its ID.\n- **Authorization**: Ownership validation is performed.\n- **Response**: `ChannelDTO` containing channel details.\n\n#### `PUT /api/channels/{id}`\n\nUpdates an existing channel by ID.\n- **Authorization**: Ownership validation is performed.\n- **Request Body**: Updated `ChannelDTO` details.\n- **Response**: Updated `ChannelDTO`.\n\n#### `DELETE /api/channels/{id}`\n\nDeletes a channel by its ID.\n- **Authorization**: Ownership validation is performed.\n- **Response**: Deleted `ChannelDTO`.\n\n### Entries\n\n#### `POST /api/entries`\n\nAdds entries linked to a channel.\n- **Request Body**: List of `EntryDTO` representing the entries to be added.\n- **Response**: List of created `EntryDTO`.\n\n#### `GET /api/entries/{entryId}`\n\nFetches an entry by its ID.\n- **Authorization**: Ownership validation is performed.\n- **Response**: `EntryDTO` containing entry details.\n\n#### `PUT /api/entries/{entryId}`\n\nUpdates an entry by ID.\n- **Authorization**: Ownership validation is performed.\n- **Request Body**: Updated `EntryDTO` details.\n- **Response**: Updated `EntryDTO`.\n\n#### `DELETE /api/entries/{entryId}`\n\nDeletes an entry by its ID.\n- **Authorization**: Ownership validation is performed.\n\n### Fields\n\n#### `GET /api/fields/{fieldId}`\n\nFetches details of a field by its ID.\n- **Authorization**: Ownership validation is performed.\n- **Response**: `FieldDTO` containing field details.\n\n#### `PUT /api/fields/{fieldId}`\n\nUpdates an existing field by its ID.\n- **Authorization**: Ownership validation is performed.\n- **Request Body**: Updated `FieldDTO` details.\n- **Response**: Updated `FieldDTO`.\n\n## Getting Started\n\n### Prerequisites\n\n- Java 21 or newer\n- Maven\n- MySQL database (can be configured through environment variables)\n\n### Running Locally\n\n1. Clone the repository.\n2. Set up a MySQL database and update the database URL, username, and password in `application.properties` or use environment variables (`DB_URL`, `DB_USERNAME`, `DB_PASSWORD`).\n3. Run the application using Maven:\n   ```sh\n   mvn spring-boot:run\n   ```\n\n### Running Tests\n\nTo run the tests, use the following command:\n```sh\nmvn test\n```\n\n## Environment Variables\n\n- `DB_URL`: URL of the MySQL database (default: `jdbc:mysql://localhost:3306/autocrud`).\n- `DB_USERNAME`: Username for the database (default: `root`).\n- `DB_PASSWORD`: Password for the database (default: `root`).\n\n## Security\n\n- Authentication is required for most endpoints.\n- Ownership validation (`@CheckOwnership`) ensures that users can only access or modify resources they own.\n\n## Technologies Used\n\n- **Java 21**\n- **Spring Boot** (including Spring Security)\n- **Maven** for dependency management\n- **MySQL** for data storage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeo-tp%2Fautocrud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeo-tp%2Fautocrud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeo-tp%2Fautocrud/lists"}