{"id":16121917,"url":"https://github.com/monosans/socnet","last_synced_at":"2025-03-17T19:31:16.203Z","repository":{"id":37030618,"uuid":"502114608","full_name":"monosans/socnet","owner":"monosans","description":"Social network built with Django Framework.","archived":false,"fork":false,"pushed_at":"2024-10-29T11:36:41.000Z","size":6661,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T13:25:52.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/monosans.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":"2022-06-10T16:42:57.000Z","updated_at":"2024-10-29T11:36:45.000Z","dependencies_parsed_at":"2023-11-13T05:26:00.447Z","dependency_job_id":"76263258-8ee9-4e89-a051-b9c6dd229a27","html_url":"https://github.com/monosans/socnet","commit_stats":{"total_commits":2950,"total_committers":5,"mean_commits":590.0,"dds":"0.45728813559322035","last_synced_commit":"c4539fde5a70647be223b09f4ff3c9aaf9713135"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosans%2Fsocnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosans%2Fsocnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosans%2Fsocnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monosans%2Fsocnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monosans","download_url":"https://codeload.github.com/monosans/socnet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878439,"owners_count":20362432,"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":"2024-10-09T21:08:43.066Z","updated_at":"2025-03-17T19:31:16.194Z","avatar_url":"https://github.com/monosans.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SocNet\n\n[![CI](https://github.com/monosans/socnet/actions/workflows/ci.yml/badge.svg)](https://github.com/monosans/socnet/actions/workflows/ci.yml)\n\nSocial network built with Django Framework.\n\n## Features\n\n- Multi-language (currently English and Russian). Selected based on browser settings.\n- Light and dark theme support with a switch. The browser theme is selected by default.\n- Infinite scrolling.\n- Progressive Web App (PWA) support.\n\n### Regular users\n\n- Register and confirm their account by email\n- Sign in\n- Add backup email addresses in case they lose access to the primary address\n- Reset and change their password\n- Use two-factor authentication with time-based one-time passwords (TOTP)\n- Provide information about themselves in their profile\n- Write real-time messages with Markdown and HTML support to other users using WebSockets\n- Create, edit, like and delete posts and comments with Markdown and HTML support\n- View images in posts, comments and messages as a gallery using [viewerjs](https://fengyuanchen.github.io/viewerjs/)\n- Subscribe to other users to see their posts in their news feed\n- Inexact search for posts by text\n- Inexact search for messages by text\n- Inexact search for users by selectable fields\n- Delete their account\n- And a lot of other little things\n\n### Administrators\n\n- All of the above\n- Use Django admin panel\n- Receive error notifications in [Sentry](https://sentry.io/) or by email\n\n## Installation\n\n[Install `Docker Compose`](https://docs.docker.com/compose/install/).\n\n### Configuration\n\nCopy the `.env.example` file to `.env`. Set the settings you need in the `.env` file.\n\n### Development\n\n```bash\n# Pull service images\ndocker compose pull --ignore-buildable\n# Build services\ndocker compose build --pull\n# Run DB migrations\ndocker compose run --rm django python3 manage.py migrate\n# Create a superuser if you want\ndocker compose run --rm django python3 manage.py createsuperuser\n# Compile translations\ndocker compose run --rm django python3 manage.py compilemessages --locale en --locale ru\n\n# Run without debugpy\ndocker compose up --remove-orphans\n# Or run with debugpy\ndocker compose -f compose.yaml -f compose.override.yaml -f compose.debug.yaml up --remove-orphans\n```\n\n### Production\n\nTo run this in production, you need to specify the production settings in `.env`.\n\n```bash\n# Pull service images\ndocker compose -f compose.yaml -f compose.prod.yaml pull --ignore-buildable\n# Build services\ndocker compose -f compose.yaml -f compose.prod.yaml build --pull\n# Run DB migrations\ndocker compose -f compose.yaml -f compose.prod.yaml run --rm django python3 manage.py migrate\n# Create a superuser if you want\ndocker compose -f compose.yaml -f compose.prod.yaml run --rm django python3 manage.py createsuperuser\n# Run\ndocker compose -f compose.yaml -f compose.prod.yaml up -d --remove-orphans\n```\n\n## Tech Stack\n\n### Containerization\n\n- Docker\n- Docker Compose\n\n### Backend\n\n- Python 3.13\n- Django 5.1\n- django-allauth\n- django-bootstrap5\n- django-cleanup\n- django-environ\n- django-filter\n- django-logentry-admin\n- django-ninja\n- channels\n- channels-redis\n- sentry-sdk\n- websockets\n\nMarkdown parsing, HTML minification and sanitization, and a few other things are implemented in Rust in the `socnet_rs` package using the following libraries:\n\n- ammonia\n- minify-html\n- pulldown-cmark\n- pyo3\n\n### Databases\n\n- PostgreSQL 17 for persistent data\n- Valkey 8 (FOSS Redis fork) for cache and as a layer for Channels\n\n### Frontend\n\n- HTML with Django Template language\n- HTMX 2\n- Bootstrap CSS 5.x\n- Font Awesome 6\n- TypeScript (compiled and minified with esbuild)\n- viewerjs\n- luxon\n\n### Web servers\n\n- Caddy\n- gunicorn\n- uvicorn\n\n### Testing\n\n- pytest\n- factory-boy\n\n### Linting\n\n- mypy\n- ruff\n- eslint\n- stylelint\n\n## DB schema\n\n![](https://github.com/monosans/socnet/assets/76561516/f8d077b5-bb2c-4834-941e-3375ef56ba48)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonosans%2Fsocnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonosans%2Fsocnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonosans%2Fsocnet/lists"}