{"id":19000442,"url":"https://github.com/typesense/showcase-joins-django","last_synced_at":"2025-06-14T07:32:09.314Z","repository":{"id":246869632,"uuid":"821536940","full_name":"typesense/showcase-joins-django","owner":"typesense","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-11T09:59:48.000Z","size":6590,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T18:17:25.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/typesense.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}},"created_at":"2024-06-28T19:12:31.000Z","updated_at":"2024-09-11T09:59:52.000Z","dependencies_parsed_at":"2024-07-05T17:11:14.190Z","dependency_job_id":null,"html_url":"https://github.com/typesense/showcase-joins-django","commit_stats":null,"previous_names":["typesense/showcase-joins-django"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Fshowcase-joins-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Fshowcase-joins-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Fshowcase-joins-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Fshowcase-joins-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typesense","download_url":"https://codeload.github.com/typesense/showcase-joins-django/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240018701,"owners_count":19734874,"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-11-08T18:07:14.641Z","updated_at":"2025-02-21T13:19:02.256Z","avatar_url":"https://github.com/typesense.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏎️ Instant Formula 1 Search with JOINs, powered by Typesense and Django\n\nThis is a demo that shows how you can use [Typesense](https://github.com/typesense/typesense), along with [Django](https://www.djangoproject.com/), in order to build a search index with near instant results.\n\n## Tech Stack\n\nThe app was built using [Django](https://www.djangoproject.com/), utilizing the [Django REST framework](https://www.django-rest-framework.org/) for the backend, along with the \u003ca href=\"https://github.com/typesense/typesense-instantsearch-adapter\" target=\"_blank\"\u003e\nTypesense Adapter for instantsearchjs\u003c/a\u003e, and a [Vite](https://vitejs.dev/) bundled React frontend, with routing from [React Router](https://reactrouter.com/en/main).\n\n## Repo Structure\n\n- `common/util/typesense_util.py` inlcudes a helper function to transform Django model instances into Typesense documents.\n- `results/management/commands/source_db` includes a custom [_django-admin_ command](https://docs.djangoproject.com/en/5.0/howto/custom-management-commands/) to source the database.\n- `results/management/commands/index_typesense` includes a custom [_django-admin_ command](https://docs.djangoproject.com/en/5.0/howto/custom-management-commands/) to index Typesense with the database data.\n- `frontend` contains the React frontend.\n- `frontend/src/components/instantsearch` contains the custom [Instantsearch](https://github.com/algolia/instantsearch) React components.\n\n## Development\n\nTo run this project locally, check out the `.env.example` file for the environment variables you'll need to configure, install the dependencies and start the Docker image, index the dataset and start the development server.\n\n```shell\n# Create the virtual python environment\npython -m venv venv\n\n# Activate the virtual environment\nsource venv/bin/activate\n\n# Install the Python dependencies\npip install -r requirements.txt\n\n# Start the docker containers\ndocker-compose up\n\n# Run the Django migrations\npython manage.py migrate\n\n# Source the database\npython manage.py source_db\n\n# Index Typesense\npython manage.py index_typesense\n\n# Start the Django development server\npython manage.py runserver\n\n# In a separate terminal, start the Vite development server\ncd frontend\n\n# Install the dependencies\npnpm install\n\n# Start the Vite development server\npnpm run dev\n```\n\nOpen `http://localhost:3000` to see the app.\n\nYou can also access `http://localhost:8000` to access the Django API. For a list of available endpoints, check the `results/urls.py` file.\n\nThere's a simple `post_save` and `post_delete` [signal configuration](https://docs.djangoproject.com/en/5.0/ref/signals/#post-save) setup, in order for auto-indexing newly created/updated or deleted records in Typesense.\n\nFor more information, please consult the [Typesense Documentation](https://typesense.org/docs/).\n\n## Credits\n\nThe dataset used in this showcase is from [The Ergast API's](http://ergast.com/mrd/) public dataset of Formula One races.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Fshowcase-joins-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypesense%2Fshowcase-joins-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Fshowcase-joins-django/lists"}