{"id":27239925,"url":"https://github.com/sesh/bm2","last_synced_at":"2026-04-12T23:51:09.335Z","repository":{"id":177465587,"uuid":"660393562","full_name":"sesh/bm2","owner":"sesh","description":"Django-powered bookmarks site.","archived":false,"fork":false,"pushed_at":"2023-12-25T22:27:13.000Z","size":181,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T23:25:21.253Z","etag":null,"topics":["bookmarks","django"],"latest_commit_sha":null,"homepage":"https://bm2.brntn.me","language":"Python","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/sesh.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}},"created_at":"2023-06-29T23:06:59.000Z","updated_at":"2024-04-28T21:23:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"b41c407d-71f3-4788-b4ad-eaaca7bbce84","html_url":"https://github.com/sesh/bm2","commit_stats":null,"previous_names":["sesh/bm2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sesh%2Fbm2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sesh%2Fbm2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sesh%2Fbm2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sesh%2Fbm2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sesh","download_url":"https://codeload.github.com/sesh/bm2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248280547,"owners_count":21077414,"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":["bookmarks","django"],"created_at":"2025-04-10T19:14:24.042Z","updated_at":"2026-04-12T23:51:04.265Z","avatar_url":"https://github.com/sesh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"`bm2` is a public iteration of my personal bookmarks site.\n\n---\n\n## About\n\nThis project exists primarily for two reasons:\n\n- I use it, deployed to bm2.brntn.me, to bookmark sites and manage those bookmarks\n- As a playground for me to experiment with techniques, tools and practices\n\nThere's are many examples of the former. I was a long-time Pinboard user, and a del.icio.us user before that.\nFor the later, this codebase hits a bunch of things I like:\n\n- Uses the steps in my \"[Six things I do every time I start a Django project][six-things]\" post (automated with my poorly-documented [`djbs`][djbs] script)\n- Runs the \"[Open source Python CI pipeline][ci]\" in Github Actions (and runs most of the checks locally with [pre-commit][precommit])\n- Takes a testing approach that relies heavily on [integration tests][integration-tests] ran with the Django test runner\n- The majority of new code is added with [Test Driven Development][tdd] and a [trunk-based][tbd] workflow\n- Uses my [django-middleware][middleware] and [django-authuser][authuser] projects\n- Deploys with [Django Up][up] onto a VPS\n- Takes a HTML-first approach with no Javascript\n- Gets an A+ on [Security Headers][headers] and the [SSL Labs Report][ssl] (June 2023)\n- Commits are GPG signed and (mostly) use [Conventional Commits][conventional-commits]\n- Logins require TOTP as a second factor (an extension to my authuser model I'm experimenting with)\n\n\n  [six-things]: https://brntn.me/blog/six-things-i-do-every-time-i-start-a-django-project/\n  [ci]: https://brntn.me/blog/open-source-python-ci/\n  [integration-tests]: https://brntn.me/blog/types-of-testing-you-should-care-about-integration-testing/\n  [middleware]: https://github.com/sesh/django-middleware\n  [authuser]: https://github.com/sesh/django-authuser\n  [up]: https://github.com/sesh/django-up\n  [tdd]: https://www.martinfowler.com/bliki/TestDrivenDevelopment.html\n  [tbd]: https://martinfowler.com/articles/branching-patterns.html\n  [headers]: https://securityheaders.com/?q=bm2.brntn.me\u0026followRedirects=on\n  [ssl]: https://www.ssllabs.com/ssltest/analyze.html?d=bm2.brntn.me\u0026latest\n  [djbs]: https://github.com/sesh/djbs\n  [conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/\n  [precommit]: https://pre-commit.com/\n\n\n## Usage\n\nI generally use `pipenv` for Python/Django projects because it's familiar.\nYou can adopt the usage instructions below to a different tool if that's more your jam.\n\nGetting this running locally is pretty straight forward.\n\nInstall the dependencies:\n\n```\npipenv install\n```\n\nGenerate a secure Django secret key and add it to `.env`:\n\n```\necho \"DJANGO_SECRET_KEY=\u003csecret!\u003e\" \u003e .env\n```\n\nRun the initial migrations to setup the database:\n\n```\npipenv run python manage.py migrate\n```\n\nThere's currently no way to create an account through the web interface, so use the CLI to create a user:\n\n```\npipenv run python manage.py createsuperuser\n```\n\nRunning the development server:\n\n```\npipenv run python manage.py runserver\n```\n\n### Running the tests\n\n```\npipenv run python manage.py test\n```\n\n### Deploying to a VPS\n\nNotes:\n\n- Ansible must be installed on your local machine\n- Target should be running Ubuntu 22.04\n- The domain that you are deploying to must be in `ALLOWED_HOSTS`\n\n```\npipenv run python manage.py up \u003cyour-domain\u003e --email=\u003cyour-email\u003e\n```\n\n### Checks\n\nA [pre-commit](https://pre-commit.com) configuration is available that runs the same checks as the Github Actions pipeline.\n\n```\npre-commit install\n```\n\nThere checks can be manually run with:\n\n```\npre-commit run --all-files\n```\n\n---\n\nGenerated with [sesh/djbs](https://github.com/sesh/djbs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsesh%2Fbm2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsesh%2Fbm2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsesh%2Fbm2/lists"}