{"id":15019295,"url":"https://github.com/vasilistotskas/grooveshop-django-api","last_synced_at":"2026-05-04T13:02:29.595Z","repository":{"id":179376355,"uuid":"662614944","full_name":"vasilistotskas/grooveshop-django-api","owner":"vasilistotskas","description":"Django Ecommerce","archived":false,"fork":false,"pushed_at":"2026-04-29T22:25:14.000Z","size":20311,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T00:35:49.075Z","etag":null,"topics":["admin-dashboard","authentication","authorization","django","django-rest-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","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/vasilistotskas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2023-07-05T14:06:16.000Z","updated_at":"2026-04-29T22:25:17.000Z","dependencies_parsed_at":"2026-01-28T22:06:35.903Z","dependency_job_id":"03706ced-2517-4f08-8106-cbd74ef936aa","html_url":"https://github.com/vasilistotskas/grooveshop-django-api","commit_stats":{"total_commits":720,"total_committers":6,"mean_commits":120.0,"dds":"0.43333333333333335","last_synced_commit":"66f9471dd7c57fb28d03dd5c4f3aa0ead5ef7638"},"previous_names":["vasilistotskas/grooveshop-django-api"],"tags_count":532,"template":false,"template_full_name":null,"purl":"pkg:github/vasilistotskas/grooveshop-django-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilistotskas%2Fgrooveshop-django-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilistotskas%2Fgrooveshop-django-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilistotskas%2Fgrooveshop-django-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilistotskas%2Fgrooveshop-django-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasilistotskas","download_url":"https://codeload.github.com/vasilistotskas/grooveshop-django-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasilistotskas%2Fgrooveshop-django-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32608309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: 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":["admin-dashboard","authentication","authorization","django","django-rest-framework"],"created_at":"2024-09-24T19:53:17.256Z","updated_at":"2026-05-04T13:02:29.554Z","avatar_url":"https://github.com/vasilistotskas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/vasilistotskas/grooveshop-django-api/badge.svg?branch=main)](https://coveralls.io/github/vasilistotskas/grooveshop-django-api?branch=main)\n\n# Grooveshop Django API\n\n## Overview\n\nA headless e-commerce API built with Django 6.0 and Django REST Framework. Supports both\nWSGI (Gunicorn) and ASGI (Daphne/Uvicorn) with real-time WebSocket notifications via\nDjango Channels. Uses Knox + Django Allauth for authentication (token API + social/MFA),\nCelery with RabbitMQ broker for background tasks, PostgreSQL 17 for data storage, Redis\nfor caching and Channels layer, and Meilisearch for federated search. Features include\nmulti-language support (Greek, English, German), Stripe payments via dj-stripe,\ncomprehensive test coverage, and a Django Unfold admin panel.\n\n## Project Structure\n\nAll Django apps live at the project root (flat structure, no `src/` directory):\n\n- **core/** — Shared infrastructure: base views, serializers, permissions, middleware, filters, caching, Celery config, URL routing\n- **user/** — User accounts, authentication, and profile management\n- **product/** — Product catalog, categories, reviews, favourites, images, and stock management\n- **order/** — Order processing and management\n- **cart/** — Shopping cart functionalities\n- **blog/** — Blog posts, categories, comments, authors, and tags\n- **search/** — Meilisearch integration with federated search, Greeklish expansion, and analytics\n- **meili/** — Meilisearch model definitions and indexing via `IndexMixin` with `MeiliMeta` config\n- **notification/** — Real-time notifications via WebSocket (Django Channels)\n- **loyalty/** — Points, XP, tiers, and rewards system\n- **country/** — Country-specific configurations\n- **region/** — Regional data and settings\n- **vat/** — VAT calculation and management\n- **pay_way/** — Payment method configurations\n- **tag/** — Tagging system for products and blog posts\n- **contact/** — Contact form and communication\n- **admin/** — Custom admin app with Django Unfold dashboard\n- **devtools/** — `CustomDjangoModelFactory` base class for all test factories\n\n## Features\n\n- **Authentication and User Management**: Knox token auth for API, Django Allauth for account management with social providers (Google, Facebook, GitHub, Discord), MFA/WebAuthn/Passkeys support\n- **Multi-Language Support**: django-parler translations for Greek (default), English, and German\n- **Advanced Search and Filtering**: Meilisearch-powered federated search with Greeklish support, instant search, and analytics tracking\n- **Payments**: Stripe integration via dj-stripe\n- **Loyalty System**: Points, XP, tiers, and rewards\n- **Task Scheduling**: Celery with RabbitMQ for background task management (stock cleanup, cart expiry, notifications, Meilisearch sync)\n- **Real-time Notifications**: WebSocket via Django Channels with per-user and admin groups\n- **Performance Optimization**: Redis caching, optimized querysets with `for_list()`/`for_detail()` patterns\n- **Testing**: Comprehensive unit and integration tests with pytest-xdist parallel execution\n- **Admin Panel**: Django Unfold admin panel with custom dashboard\n- **API Documentation**: OpenAPI 3.0 via drf-spectacular (Swagger UI and Redoc)\n- **Containerization**: Docker Compose for full-stack deployment\n\n## Technologies\n\n- **Frameworks**: Django 6.0, Django REST Framework 3.16\n- **Authentication**: Django REST Knox (API tokens), Django Allauth (accounts, social, MFA)\n- **Database**: PostgreSQL 17\n- **Cache / Channels**: Redis\n- **Task Management**: Celery\n- **Message Broker**: RabbitMQ\n- **Search**: Meilisearch v1.42.1\n- **Payments**: Stripe (dj-stripe)\n- **Server**: Uvicorn (ASGI), Gunicorn (WSGI), Daphne (Channels)\n- **Containerization**: Docker\n- **Package Management**: uv\n\n## Setup\n\n### Prerequisites\n\n- Python 3.14 or higher\n- Django 6.0 or higher\n- PostgreSQL 17\n- Redis\n- RabbitMQ\n- Meilisearch v1.42.1 or higher\n\n### Meilisearch Setup\n\n#### Installation\n\n**Using Docker:**\n```bash\ndocker run -d \\\n  --name meilisearch \\\n  -p 7700:7700 \\\n  -e MEILI_MASTER_KEY=YOUR_MASTER_KEY \\\n  -v $(pwd)/meili_data:/meili_data \\\n  getmeili/meilisearch:v1.42.1\n```\n\n**Using Docker Compose:**\n```yaml\nservices:\n  meilisearch:\n    image: getmeili/meilisearch:v1.42.1\n    ports:\n      - \"7700:7700\"\n    environment:\n      - MEILI_MASTER_KEY=YOUR_MASTER_KEY\n    volumes:\n      - ./meili_data:/meili_data\n```\n\n#### Configuration\n\nAdd Meilisearch settings to your `.env` file:\n```env\nMEILISEARCH_HOST=http://localhost:7700\nMEILISEARCH_MASTER_KEY=YOUR_MASTER_KEY\n```\n\n#### Enable Experimental Features\n\nEnable the CONTAINS operator for substring matching:\n```bash\npython manage.py meilisearch_enable_experimental --feature containsFilter\n```\n\n#### Configure Index Settings\n\nUpdate index settings for optimal performance:\n```bash\n# ProductTranslation index\npython manage.py meilisearch_update_index_settings \\\n    --index ProductTranslation \\\n    --max-total-hits 50000 \\\n    --search-cutoff-ms 1500 \\\n    --max-values-per-facet 100\n\n# BlogPostTranslation index\npython manage.py meilisearch_update_index_settings \\\n    --index BlogPostTranslation \\\n    --max-total-hits 50000 \\\n    --search-cutoff-ms 1500 \\\n    --max-values-per-facet 100\n```\n\n#### Configure Ranking Rules\n\nSet up custom ranking rules for e-commerce:\n```bash\n# Prioritize in-stock products and discounts\npython manage.py meilisearch_update_ranking \\\n    --index ProductTranslation \\\n    --rules \"words,typo,proximity,attribute,sort,stock:desc,discount_percent:desc,exactness\"\n\n# Prioritize popular blog posts\npython manage.py meilisearch_update_ranking \\\n    --index BlogPostTranslation \\\n    --rules \"words,typo,proximity,attribute,sort,view_count:desc,exactness\"\n```\n\n#### Sync Data to Meilisearch\n\n```bash\n# Sync all indexes\npython manage.py meilisearch_sync_all_indexes\n\n# Or sync specific indexes\npython manage.py meilisearch_sync_index --model ProductTranslation\npython manage.py meilisearch_sync_index --model BlogPostTranslation\n```\n\n#### Test Federated Search\n\n```bash\npython manage.py meilisearch_test_federated \\\n    --query \"laptop\" \\\n    --language-code en \\\n    --limit 20\n```\n\n### OpenAPI Schema Generation\n\nGenerate TypeScript types and Zod schemas for the frontend:\n\n```bash\n# Generate OpenAPI schema\nuv run python manage.py spectacular --color --file schema.yml\n\n# Frontend will use this schema to generate types\n# See grooveshop-storefront-ui-node-nuxt/README.md for frontend setup\n```\n\n## Common Commands\n\n```bash\n# Install dependencies (uses uv, not pip)\nuv sync --locked --all-extras --dev\n\n# Run all tests (parallel by default)\nuv run pytest\n\n# Run a single test file\nuv run pytest tests/unit/path/to/test_file.py\n\n# Run tests with coverage (sequential)\nuv run pytest --cov=. --cov-report=term --cov-report=html --cov-config=pyproject.toml -n0\n\n# Lint and format\nuv run ruff check --fix\nuv run ruff format\n\n# Run all pre-commit hooks\nuv run pre-commit run --all-files\n\n# Django management\nuv run python manage.py makemigrations\nuv run python manage.py migrate\nuv run python manage.py runserver\nuv run python manage.py createsuperuser\nuv run python manage.py seed_all\n\n# Generate OpenAPI schema (used by Nuxt frontend for types)\nuv run python manage.py spectacular --color --file schema.yml\n\n# Meilisearch index management\nuv run python manage.py meilisearch_sync_all_indexes\nuv run python manage.py meilisearch_sync_index --model ProductTranslation\n\n# Celery (local development)\ncelery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler\ncelery -A core worker -E -l info --pool=solo\ncelery -A core flower --broker=amqp://guest:guest@localhost:5672// --broker_api=http://guest:guest@localhost:15672/api// --port=5555\n\n# Docker (full stack)\ndocker compose up -d --build\n```\n\n## Meilisearch Management\n\n### Index Management\n```bash\nuv run python manage.py meilisearch_sync_all_indexes\nuv run python manage.py meilisearch_sync_index --model ProductTranslation\nuv run python manage.py meilisearch_clear_index --index ProductTranslation\nuv run python manage.py meilisearch_drop --index ProductTranslation\nuv run python manage.py meilisearch_inspect_index --index ProductTranslation\n```\n\n### Configuration\n```bash\nuv run python manage.py meilisearch_enable_experimental --feature containsFilter\nuv run python manage.py meilisearch_update_index_settings --index ProductTranslation --max-total-hits 50000 --search-cutoff-ms 1500\nuv run python manage.py meilisearch_update_ranking --index ProductTranslation --rules \"words,typo,proximity,attribute,sort,stock:desc,discount_percent:desc,exactness\"\n```\n\n### Testing and Analytics\n```bash\nuv run python manage.py meilisearch_test_federated --query \"laptop\" --language-code en --limit 20\nuv run python manage.py meilisearch_export_analytics --start-date 2024-01-01 --end-date 2024-12-31 --output analytics.json\n```\n\nFor detailed documentation, see:\n- [Search API Documentation](docs/api/search.md)\n- [CONTAINS Operator Guide](docs/search/contains-operator.md)\n- [Management Commands Reference](docs/search/management-commands.md)\n\n## License\n\nThis project is open-sourced under the MIT License. See the [LICENSE](LICENSE.md) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilistotskas%2Fgrooveshop-django-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasilistotskas%2Fgrooveshop-django-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasilistotskas%2Fgrooveshop-django-api/lists"}