{"id":20826698,"url":"https://github.com/cedrickchee/snippetbox","last_synced_at":"2025-03-12T07:23:42.062Z","repository":{"id":64301920,"uuid":"253266612","full_name":"cedrickchee/snippetbox","owner":"cedrickchee","description":"A web app to paste and share snippets of text","archived":false,"fork":false,"pushed_at":"2020-04-10T15:57:31.000Z","size":145,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T17:49:29.022Z","etag":null,"topics":["educational-project","full-stack-web-development","go","golang","golang-application","learning-by-doing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedrickchee.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}},"created_at":"2020-04-05T15:25:43.000Z","updated_at":"2025-01-06T13:01:19.000Z","dependencies_parsed_at":"2023-01-15T09:31:12.289Z","dependency_job_id":null,"html_url":"https://github.com/cedrickchee/snippetbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrickchee%2Fsnippetbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrickchee%2Fsnippetbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrickchee%2Fsnippetbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedrickchee%2Fsnippetbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedrickchee","download_url":"https://codeload.github.com/cedrickchee/snippetbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243174023,"owners_count":20248218,"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":["educational-project","full-stack-web-development","go","golang","golang-application","learning-by-doing"],"created_at":"2024-11-17T23:09:48.025Z","updated_at":"2025-03-12T07:23:42.025Z","avatar_url":"https://github.com/cedrickchee.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/screenshot.png\" alt=\"Snippetbox\" width=\"500\"/\u003e\n\u003c/p\u003e\n\n# Snippetbox\n\nThis application was developed by following the [Let's Go book by Alex Edwards](https://lets-go.alexedwards.net/).\n\nIt's a full-stack Go web application called Snippetbox that lets people paste and share snippets of text — a bit like GitHub's Gists or Pastebin.\n\n## Features\n\n- Save and view snippets.\n- Middleware.\n- RESTful routing.\n- SSL/TLS web server using HTTP 2.0.\n- User authentication. User can signup and login.\n- Leveled logging.\n- Data persistence using MySQL database.\n- Dynamic HTML using Go templates\n- Session management\n- Web security\n\n## Development\n\nSoftware requirements:\n\n- This project supports Go modules. Go 1.13+ is required.\n- MySQL\n- make\n\nTo start the local web server with HTTPS on port 4000:\n\n```sh\n$ git clone https://github.com/cedrickchee/snippetbox\n$ cd snippetbox\n\n# Generate TLS key and cert\n$ make cert\n\n$ make dev\n```\n\nTo run the tests, run `make test`.\n\n## Dependencies\n\nThis project is all based on the standard library. You don't need a framework to build web applications in Go. Go's standard library contains almost all the tools that you need, even for a moderately complex application. The book teaches you to build web applications using the standard library (rather than using a specific framework like Echo, Chi or Gin). A few small external packages are used where it makes sense for security reasons and to reduce complexity.\n\n## Recommended Minor Changes\n\nFeel free to carry on playing around with the project and trying to extend it further. You might like to try:\n- Adding a new \"About\" page to the website.\n- Increasing code coverage by adding more unit and integration tests.\n- Creating an API endpoint which returns a JSON representation of a snippet.\n- Adding functionality to confirm a user’s email address on signup.\n- Adding functionality for a user to reset their password.\n- Creating a command line application under `cmd/cli` to carry out database admin tasks.\n\n## Things I Learned\n\n- Go for web development using just the standard library.\n- How to start small and iteratively improve the codebase by refactoring.\n- How to structure a project and create testable packages.\n- How to create **maintainable** web applications.\n- Basic web security.\n- How HTTPS works.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedrickchee%2Fsnippetbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedrickchee%2Fsnippetbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedrickchee%2Fsnippetbox/lists"}