{"id":31637732,"url":"https://github.com/codesignal/learn_pastebin-java","last_synced_at":"2025-10-07T01:39:37.304Z","repository":{"id":316125626,"uuid":"1061930242","full_name":"CodeSignal/learn_pastebin-java","owner":"CodeSignal","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-22T19:49:08.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-22T21:22:35.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeSignal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T15:18:32.000Z","updated_at":"2025-09-22T19:49:12.000Z","dependencies_parsed_at":"2025-09-22T21:22:39.515Z","dependency_job_id":null,"html_url":"https://github.com/CodeSignal/learn_pastebin-java","commit_stats":null,"previous_names":["codesignal/learn_pastebin-java"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CodeSignal/learn_pastebin-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSignal","download_url":"https://codeload.github.com/CodeSignal/learn_pastebin-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708068,"owners_count":26031932,"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-10-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2025-10-07T01:39:15.370Z","updated_at":"2025-10-07T01:39:37.296Z","avatar_url":"https://github.com/CodeSignal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pastebin Demo Application\n\nA simple Pastebin-like application built with Spring Boot, React, TypeScript. This application is intentionally built with minimal security measures for educational purposes in security courses.\n\n## Features\n\n- Code snippet creation and editing\n- Support for multiple programming languages:\n  - TypeScript\n  - JavaScript\n  - Python\n  - Java\n  - C++\n- Syntax highlighting using CodeMirror\n- File upload functionality\n- Basic user authentication\n- Unique URLs for each saved snippet\n- SQLite database with Hibernate/JPA\n\n## ⚠️ Security Notice\n\nThis application is deliberately built WITHOUT security measures for educational purposes. It contains various vulnerabilities including but not limited to:\n- SQL Injection possibilities\n- No input validation\n- Weak authentication\n- No CSRF protection\n- Potential XSS vulnerabilities\n\nDO NOT USE THIS IN PRODUCTION!\n\n## Prerequisites\n\n- Java 17 (JDK)\n- Maven 3.9+\n- Node.js (v18 or higher)\n- npm (Node Package Manager)\n\n## Installation\n\n1. Build the frontend:\n```bash\ncd frontend\nnpm install\nnpm run build\ncd ..\n```\n\n2. Start the application (backend):\n```bash\ncd backend\nmvn spring-boot:run\n```\n\n## Usage\n\n1. Access the application at `http://localhost:3000`\n\n2. Login with default credentials:\n   - Username: `admin`\n   - Password: `codesignal`\n\n3. Create new snippets:\n   - Enter a title\n   - Select a programming language\n   - Write or paste your code\n   - Click \"Save\" to generate a unique URL\n\n4. Upload files:\n   - Click the file upload button\n   - Select a text file\n   - The content will be automatically loaded into the editor\n\n5. Access saved snippets:\n   - Use the generated URL (format: `/snippet/:id`)\n   - Edit and save changes as needed\n\n## Development\n\n### Running in Development Mode\n```bash\n# Build frontend\ncd frontend \u0026\u0026 npm install \u0026\u0026 npm run build \u0026\u0026 cd ..\n\n# Run backend (will serve the built frontend)\ncd backend \u0026\u0026 mvn spring-boot:run\n```\n\nThe application runs on port 3000 by default.\n\n### Troubleshooting\n\nIf you encounter issues:\n\n1. **Java version issues**: Ensure you're using JDK 17 and Maven 3.9+\n2. **Frontend build**: Rebuild if UI isn’t loading: `cd frontend \u0026\u0026 npm run build`\n3. **Port already in use**: The app will try to use port 3000\n4. **Database issues**: Delete `database.sqlite` file and restart\n\n## API Endpoints\n\n- `POST /api/auth/login` - User authentication\n- `POST /api/auth/register` - User registration\n- `POST /api/snippets` - Create/update snippets\n- `GET /api/snippets/{id}` - Retrieve a specific snippet\n\n## Contributing\n\nThis is a demo application for educational purposes. If you find any bugs or want to suggest improvements, please open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesignal%2Flearn_pastebin-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesignal%2Flearn_pastebin-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesignal%2Flearn_pastebin-java/lists"}