{"id":30815519,"url":"https://github.com/codesignal/learn_pastebin-python","last_synced_at":"2025-09-06T08:52:49.504Z","repository":{"id":313190507,"uuid":"1049176873","full_name":"CodeSignal/learn_pastebin-python","owner":"CodeSignal","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-04T11:37:31.000Z","size":37376,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T13:25:16.061Z","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-02T15:41:55.000Z","updated_at":"2025-09-04T11:01:11.000Z","dependencies_parsed_at":"2025-09-04T13:25:20.153Z","dependency_job_id":"5988416a-f5af-4124-9d36-d431c8e7efe3","html_url":"https://github.com/CodeSignal/learn_pastebin-python","commit_stats":null,"previous_names":["codesignal/learn_pastebin-python"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CodeSignal/learn_pastebin-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSignal","download_url":"https://codeload.github.com/CodeSignal/learn_pastebin-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSignal%2Flearn_pastebin-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273880196,"owners_count":25184429,"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-09-06T02:00:13.247Z","response_time":2576,"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-09-06T08:52:44.449Z","updated_at":"2025-09-06T08:52:49.472Z","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 FastAPI, 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 SQLAlchemy 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- Python 3.10 (required for dependency compatibility)\n- Node.js (v18 or higher)\n- npm (Node Package Manager)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone [repository-url]\ncd python-learn_pastebin\n```\n\n2. Create and activate virtual environment:\n```bash\n# Create virtual environment\npython3.10 -m venv venv\n\n# Activate virtual environment\n# On macOS/Linux:\nsource venv/bin/activate\n# On Windows:\nvenv\\Scripts\\activate\n```\n\n3. Install Python dependencies:\n```bash\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n4. Install frontend dependencies and build:\n```bash\ncd frontend\nnpm install\nnpm run build\ncd ..\n```\n\n5. Start the application:\n```bash\npython main.py\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# Ensure virtual environment is activated\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Run backend (will also serve frontend)\npython main.py\n```\n\nThe application runs on port 3000 by default.\n\n### Troubleshooting\n\nIf you encounter issues:\n\n1. **Python version issues**: Ensure you're using Python 3.8+\n2. **Installing Python 3.11**:\n   - macOS: `brew install python@3.11`\n   - Ubuntu: `sudo apt install python3.11 python3.11-venv`\n   - Windows: Download from python.org\n3. **Module not found errors**: Make sure virtual environment is activated and dependencies are installed\n4. **Port already in use**: The app will try to use port 3000\n5. **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-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesignal%2Flearn_pastebin-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesignal%2Flearn_pastebin-python/lists"}