{"id":26562597,"url":"https://github.com/amssdias/multitenant-blog-platform","last_synced_at":"2026-04-11T14:31:21.906Z","repository":{"id":283561283,"uuid":"951975086","full_name":"amssdias/multitenant-blog-platform","owner":"amssdias","description":"Multi-tenant blog platform with per-user subdomains and isolated content.","archived":false,"fork":false,"pushed_at":"2026-02-02T22:27:01.000Z","size":549,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-03T11:41:30.264Z","etag":null,"topics":["authentication","django","multitenant","postgres","redis","schema"],"latest_commit_sha":null,"homepage":"","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/amssdias.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-20T14:35:14.000Z","updated_at":"2026-02-02T22:27:04.000Z","dependencies_parsed_at":"2025-05-31T23:51:59.618Z","dependency_job_id":null,"html_url":"https://github.com/amssdias/multitenant-blog-platform","commit_stats":null,"previous_names":["amssdias/multitenant-blog-platform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amssdias/multitenant-blog-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amssdias%2Fmultitenant-blog-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amssdias%2Fmultitenant-blog-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amssdias%2Fmultitenant-blog-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amssdias%2Fmultitenant-blog-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amssdias","download_url":"https://codeload.github.com/amssdias/multitenant-blog-platform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amssdias%2Fmultitenant-blog-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31684523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["authentication","django","multitenant","postgres","redis","schema"],"created_at":"2025-03-22T15:18:16.731Z","updated_at":"2026-04-11T14:31:21.897Z","avatar_url":"https://github.com/amssdias.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏗️ Django Multitenant Blog Platform\n\n[![Tests](https://github.com/amssdias/multitenant-blog-platform/actions/workflows/tests.yml/badge.svg)](https://github.com/amssdias/multitenant-blog-platform/actions/workflows/tests.yml)\n\n![Python](https://img.shields.io/badge/Python-3.9-blue?style=for-the-badge\u0026logo=python)\n![Django](https://img.shields.io/badge/Django-4.2-green?style=for-the-badge\u0026logo=django)\n![PostgreSQL](https://img.shields.io/badge/PostgreSQL-17-blue?style=for-the-badge\u0026logo=postgresql)\n![Redis](https://img.shields.io/badge/Redis-7.2-red?style=for-the-badge\u0026logo=redis)\n![Celery](https://img.shields.io/badge/Celery-5.6-37814A?style=for-the-badge\u0026logo=celery)\n![Multitenancy](https://img.shields.io/badge/Architecture-Multitenant-orange?style=for-the-badge)\n\n## 🚀 Overview\n\nThis is a **Django Multitenant Blog Platform** where users can sign up on the **main domain**, and upon registration,\nthey get their own **subdomain** with an isolated schema to create and manage their own blog.\n\n## 🧠 Key Concepts\n\n- **Schema-based multitenancy** using PostgreSQL\n- **Subdomain routing** per tenant\n- **Isolated data per tenant**\n- **Shared users table** on the public schema\n- **CI-tested architecture**\n\n## 🔥 Features\n\n### 🌍 Main Domain (`example.com`)\n\n- User registration \u0026 authentication\n- Tenant provisioning on signup\n- Subdomain assignment (`user.example.com`)\n\n### 🧩 Tenant Subdomains (`user.example.com`)\n\n- Automatic redirect after login\n- Blog post creation \u0026 management\n- Fully isolated PostgreSQL schema per tenant\n\n### ⚙️ Technical Highlights\n\n- Django + schema-based multitenancy\n- PostgreSQL (schemas)\n- Redis support\n- Docker-ready\n- GitHub Actions CI (tests on push \u0026 PR)\n\n\n## 🏗️ Architecture\n\n\u003e Each user owns a tenant schema while authentication and tenant metadata live in the public schema.\n\n\n## 🛠️ Installation \u0026 Setup\n\n### 1️⃣ Clone the Repository\n\n```sh\ngit clone https://github.com/yourusername/multitenant-blog.git\ncd multitenant-blog\n```\n\n### 2️⃣ Install Dependencies\n\n```sh\npip install pipenv\npipenv install --dev\n```\n\n### 3️⃣ Configure the Environment\n\nCopy the example environment file and adjust values if needed:\n\n```bash\ncp .env.example .env\n```\n\nRequired to run the project:\n\n- Django settings (`DJANGO_SECRET_KEY`, `DJANGO_ALLOWED_HOSTS`)\n- PostgreSQL connection (`DB_NAME`, `DB_USER`, `DB_PASSWORD`, `DB_HOST`, `DB_PORT`)\n- Redis connection (`REDIS_PROTOCOL`, `REDIS_PORT`, `REDIS_PASSWORD`, `REDIS_DB_CELERY`)\n\nOptional (only if you want to test email/Celery email tasks):\n\n- SMTP settings (`EMAIL_HOST`, `EMAIL_PORT`, `EMAIL_USE_TLS`, `EMAIL_HOST_USER`, `EMAIL_HOST_PASSWORD`,\n  `DEFAULT_FROM_EMAIL`)\n\n### 4️⃣ Run Migrations\n\n```sh\npython manage.py migrate\n```\n\n### 5️⃣ Start the Development Server\n\n```sh\npython manage.py runserver --settings=bloggies.settings.settings_development\n```\n\n## 🖥️ Local subdomain setup\n\nTo enable subdomains locally, configure your hosts file:\n\n👉 [Localhost multitenancy setup guide](https://github.com/amssdias/multitenant-blog-platform/wiki/Multitenancy-Localhost-Setup)\n\n\n## 🧪 Testing \u0026 CI\n\n- Automated tests run on every push request\n- PostgreSQL-backed test environment\n- GitHub Actions workflow: tests.yml\n\n```shell\npipenv run python manage.py test --settings=bloggies.settings.settings_tests\n```\n\n\n## 🎯 Use Cases\n\n- SaaS blog platforms\n- Multi-tenant CMS systems\n- Portfolio-ready Django architecture\n- Learning reference for schema-based multitenancy\n\n\n## 🧩 Built to demonstrate real-world Django multitenant architecture\n\n![Multitenant Architecture](docs/images/multitenant-architecture.png)\n\nThis project is intentionally designed as a **production-style reference** for building\n**schema-based multitenant applications** with Django.\n\nIt focuses on **architectural correctness and real constraints**, rather than shortcuts\ncommonly used in tutorials.\n\nSpecifically, it demonstrates:\n\n- Schema-based data isolation using **PostgreSQL schemas**\n- Subdomain-driven tenant resolution (`user.example.com`)\n- A shared **public schema** for authentication and tenant metadata\n- Clean separation between **public** and **tenant-specific** concerns\n- A CI pipeline that validates the architecture using real services\n\nThe goal is to showcase how a real SaaS-style multitenant Django application can be structured,\ntested, and reasoned about.\n\n---\n🚀 Happy Coding! 🎯\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famssdias%2Fmultitenant-blog-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famssdias%2Fmultitenant-blog-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famssdias%2Fmultitenant-blog-platform/lists"}