{"id":25303503,"url":"https://github.com/codesignal/learn_paste-bin","last_synced_at":"2025-04-07T02:30:18.816Z","repository":{"id":276980078,"uuid":"930161810","full_name":"CodeSignal/learn_paste-bin","owner":"CodeSignal","description":"A demo app (aka Pastebin) for Security courses","archived":false,"fork":false,"pushed_at":"2025-02-19T03:05:11.000Z","size":31633,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-19T04:21:53.903Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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}},"created_at":"2025-02-10T07:14:20.000Z","updated_at":"2025-02-19T03:05:15.000Z","dependencies_parsed_at":"2025-02-11T22:30:35.080Z","dependency_job_id":null,"html_url":"https://github.com/CodeSignal/learn_paste-bin","commit_stats":null,"previous_names":["codesignal/learn-app-pastebin","codesignal/learn_paste-bin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_paste-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_paste-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_paste-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_paste-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSignal","download_url":"https://codeload.github.com/CodeSignal/learn_paste-bin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247581373,"owners_count":20961762,"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","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-02-13T07:36:16.632Z","updated_at":"2025-04-07T02:30:18.729Z","avatar_url":"https://github.com/CodeSignal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pastebin Demo Application\n\nA simple Pastebin-like application built with React, TypeScript, and Express. 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 Sequelize ORM\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- Node.js (v14 or higher)\n- npm (Node Package Manager)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone [repository-url]\ncd learn_paste-bin\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Start the backend and frontend development server:\n```bash\nnpm run dev:all\n```\n\n## Usage\n\n1. Access the application at `http://localhost:3000`\n\n2. Login with default credentials:\n   - Username: `admin`\n   - Password: `admin`\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## Project Structure\n\n```\nsrc/\n├── server/\n│   ├── models/\n│   │   ├── index.ts\n│   │   ├── Snippet.ts\n│   │   └── User.ts\n│   └── index.ts\n├── components/\n│   ├── Editor.tsx\n│   └── Login.tsx\n├── types.ts\n├── App.tsx\n└── main.tsx\n```\n\n## API Endpoints\n\n- `POST /api/login` - User authentication\n- `POST /api/snippets` - Create/update snippets\n- `GET /api/snippets/:id` - Retrieve a specific snippet\n\n## Development\n\nBoth backend and frontend run on port 3000:\n```bash\nnpm run dev:all\n```\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_paste-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesignal%2Flearn_paste-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesignal%2Flearn_paste-bin/lists"}