{"id":14561823,"url":"https://github.com/latitude-dev/latitude","last_synced_at":"2025-11-09T19:03:53.859Z","repository":{"id":227322997,"uuid":"750847305","full_name":"latitude-dev/latitude","owner":"latitude-dev","description":"Developer-first embedded analytics","archived":false,"fork":false,"pushed_at":"2024-09-30T17:27:16.000Z","size":5138,"stargazers_count":929,"open_issues_count":4,"forks_count":51,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-06T20:55:14.441Z","etag":null,"topics":["analytics","business-intelligence","dashboard","data","data-analysis","data-analytics","data-app","data-engineering","data-science","data-visualization","duckdb","embedded-analytics","exploratory-data-analysis","javascript-framework","open-source","react","self-hosted","sql","svelte","tailwindcss"],"latest_commit_sha":null,"homepage":"https://latitude.so","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/latitude-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-01-31T12:48:57.000Z","updated_at":"2025-10-06T15:55:27.000Z","dependencies_parsed_at":"2024-04-16T17:43:52.883Z","dependency_job_id":"c584a283-72a0-435f-a8af-ac1fc0c5c4cb","html_url":"https://github.com/latitude-dev/latitude","commit_stats":null,"previous_names":["latitude-dev/latitude"],"tags_count":456,"template":false,"template_full_name":null,"purl":"pkg:github/latitude-dev/latitude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latitude-dev%2Flatitude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latitude-dev%2Flatitude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latitude-dev%2Flatitude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latitude-dev%2Flatitude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/latitude-dev","download_url":"https://codeload.github.com/latitude-dev/latitude/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latitude-dev%2Flatitude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283562410,"owners_count":26856284,"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","status":"online","status_checked_at":"2025-11-09T02:00:05.828Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["analytics","business-intelligence","dashboard","data","data-analysis","data-analytics","data-app","data-engineering","data-science","data-visualization","duckdb","embedded-analytics","exploratory-data-analysis","javascript-framework","open-source","react","self-hosted","sql","svelte","tailwindcss"],"created_at":"2024-09-07T02:01:00.150Z","updated_at":"2025-11-09T19:03:53.774Z","avatar_url":"https://github.com/latitude-dev.png","language":"TypeScript","readme":"\u003ch1\u003eNo longer maintained\u003c/h1\u003e\n\u003cp\u003eLatitude embedded analytics is no longer maintained as we've switched our focus to \u003ca href='https://github.com/latitude-dev/latitude-llm'\u003eLatitude LLM\u003c/a\u003e. License is maintained so you are still free to use this project as it is. New maintainers are welcome.\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://latitude.so?utm_source=github\" target=\"_blank\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/latitude-dev/latitude/assets/5465249/4783e122-7150-4bcc-96e0-a3c9c4c1c53b\"\u003e\n    \u003cimg alt=\"Latitude Logo\" src=\"https://github.com/latitude-dev/latitude/assets/5465249/92cd5508-6177-485a-a758-67d71e2cd5ce\" width=\"280\"/\u003e\n  \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003ch1 align=\"center\" style=\"border: none; margin-bottom: 8px;\"\u003eThe open-source framework for embedded analytics\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\nThe missing analytics layer between your database and your users.\n\u003c/div\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://docs-analytics.latitude.so\" rel=\"dofollow\"\u003e\u003cstrong\u003eSee documentation →\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://github.com/latitude-dev/latitude/issues/new\"\u003eReport Bug\u003c/a\u003e\n    ·\n  \u003ca href=\"https://trylatitude.slack.com/join/shared_invite/zt-17dyj4elt-rwM~h2OorAA3NtgmibhnLA#/shared-invite/email\"\u003eJoin Our Slack\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/orgs/latitude-dev/projects/1\"\u003eRoadmap\u003c/a\u003e\n    ·\n    \u003ca href=\"https://x.com/trylatitude\"\u003eX\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@latitude-data/cli\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@latitude-data/cli\" alt=\"NPM\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@latitude-data/server\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/@latitude-data/server\" alt=\"npm downloads\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://github.com/latitude-dev/latitude/actions/workflows/linter.yml/badge.svg\" alt=\"Linter\"\u003e\n  \u003cimg src=\"https://github.com/latitude-dev/latitude/actions/workflows/test.yml/badge.svg\" alt=\"Tests\"\u003e\n\u003c/p\u003e\n\n## 🌈 Why Latitude?\n\nLatitude lets you create API endpoints on top of your database/warehouse using just SQL, and embed interactive visualizations natively in your favorite frontend framework or through an iframe.\n\nIt's fast to get started, easy to maintain, and scales with your data.\n\n\u003cimg alt=\"latitude-stack\" src=\"https://github.com/latitude-dev/latitude/assets/5465249/cc650dc8-d974-43ea-b95c-41c48fa53c67\"\u003e\n\n## ✨ Features\n\n- ☁️ Connect to any database or data warehouse\n\n- 📊 Easily compose parameterized SQL queries and expose them as API endpoints\n\n- 📦 Built-in cache layer for lightning-fast query performance\n\n- 🛠 Integrations with all common frontend frameworks (React, Svelte, Vue, VanilaJS)\n\n- 🎨 Optional layout engine to build standalone dashboards using Svelte and Tailwind\n\n- 🖥️ Support for embedding dashboards via iframe\n\n- 🌎 Deploy with a single command `latitude deploy`\n\n- 🔒 SSL-ready, encrypted parameters in url and parameterized queries to protect against SQL injection attacks\n\n- 👥 Open-source driven by the community\n\n## 💫 Examples\n\nYou can find sample projects using Latitude in action in the [examples](https://github.com/latitude-dev/latitude/tree/main/examples) directory.\n\n## 📚 Table Of Contents\n\n- [Quick start](https://github.com/latitude-dev/latitude#-quick-start)\n- [Connect to your data sources](https://github.com/latitude-dev/latitude#-connect-to-your-data-sources)\n- [Write your SQL queries](https://github.com/latitude-dev/latitude#-write-your-sql-queries)\n\n- [Native frontend integration](https://github.com/latitude-dev/latitude#-native-frontend-integration)\n  - [Integrate with your frontend](https://github.com/latitude-dev/latitude#-integrate-with-your-frontend)\n- [Layout engine and iframe embedding](https://github.com/latitude-dev/latitude#-layout-engine-and-iframe-embedding)\n  - [Use our layout engine](https://github.com/latitude-dev/latitude#-optional-use-our-layout-engine)\n  - [Embedding a standalone dashboard](https://github.com/latitude-dev/latitude#-embedding-a-standalone-dashboard)\n- [Deploy](https://github.com/latitude-dev/latitude#-deploy)\n- [Community](https://github.com/latitude-dev/latitude#-community)\n- [Contributing](https://github.com/latitude-dev/latitude#-contributing)\n- [Links](https://github.com/latitude-dev/latitude#-links)\n\n## ⚡ Quick start\n\nHere’s a quick getting started guide to get the sample app up and running:\n\n### 1. Install Latitude\n\nRun the following command to install the Latitude CLI globally on your machine:\n\n```\nnpm install -g @latitude-data/cli\n```\n\nNote that if you're using Windows, you might need to follow these instructions first: [Windows setup](https://docs-analytics.latitude.so/guides/getting-started/windows-compatibility).\n\n### 2. Create the starter project\n\nRun this command to create a new Latitude project:\n\n```\nlatitude start\n```\n\nThe CLI will ask you the project name. Once you’re done, you’ll have a new\ndirectory with a sample app that you can run and customize.\n\n### 3. Navigate to the project and run the app\n\n```\ncd my-new-app\n```\n\n```\nlatitude dev\n```\n\nThis will start the development server and open the sample app in your browser.\n\n## 🔗 Connect to your data sources\n\nSet up the connection to your database or data warehouse through a simple configuration file.\n\n```yaml source.yml\ntype: postgres\ndetails:\n  database: db\n  user: username\n  password: ••••••••••••••••\n  host: postgres.example.com\n  port: 5432\n  schema: public\n  ssl: true\n```\n\nWe do not recommend to store your database credentials in the configuration file. Instead, you can use environment variables to store your credentials securely. Find out more about this in the [documentation](https://docs-analytics.latitude.so/sources/credentials).\n\nWe support the following sources:\n\n- [x] [Athena](https://docs-analytics.latitude.so/sources/athena)\n- [x] [BigQuery](https://docs-analytics.latitude.so/sources/bigquery)\n- [x] [Clickhouse](https://docs-analytics.latitude.so/sources/clickhouse)\n- [x] [Databricks](https://docs-analytics.latitude.so/sources/databricks)\n- [x] [DuckDB](https://docs-analytics.latitude.so/sources/duckdb)\n- [x] [MS SQL](https://docs-analytics.latitude.so/sources/mssql)\n- [x] [MySQL](https://docs-analytics.latitude.so/sources/mysql)\n- [x] [PostgreSQL](https://docs-analytics.latitude.so/sources/postgresql)\n- [x] [Redshift](https://docs-analytics.latitude.so/sources/redshift)\n- [x] [Snowflake](https://docs-analytics.latitude.so/sources/snowflake)\n- [x] [SQLite](https://docs-analytics.latitude.so/sources/sqlite)\n- [x] [Trino](https://docs-analytics.latitude.so/sources/trino)\n\nFind out more about connecting to sources in the [documentation](https://docs-analytics.latitude.so/sources/how-to-configure-sources).\n\n## 🧑‍💻 Write your SQL queries\n\nLatitude makes it easy to fetch data from your database and expose it via an API endpoint in JSON format so that it can be easily consumed by your frontend application.\n\nYou can use parameters in your SQL queries to filter data based on external inputs. For example, you can create a query that fetches movies released between two years:\n\n#### /queries/titles.sql\n\n```sql titles.sql\nselect id,\n       title,\n       release_year,\n       type,\n       runtime,\n       imdb_score\nfrom titles\nwhere release_year between { param('start_year') } and { param('end_year') }\n```\n\nAdditionally, you can reference other queries in your SQL to create composable data pipelines. For example, this is a query that uses the results of the previous one to display the count of titles released each year:\n\n#### /queries/titles-agg.sql\n\n```sql titles-agg.sql\nselect\n  release_year,\n  count(*) as total_titles,\nfrom { ref('titles') }\ngroup by 1\norder by 1 asc\n```\n\n### Automatic API endpoints\n\nLatitude will automatically expose these queries as API endpoints that you can fetch from your frontend application.\n\nTo use these endpoints with parameters, you can pass them in the URL. For example, to fetch movies released between 2000 and 2020, you can do:\n\n```bash\ncurl http://localhost:3000/titles?start_year=2000\u0026end_year=2020\n```\n\n## ⌨️ Native frontend integration\n\n### Integrate with your frontend\n\nUse our React components to fetch data from your API and display it in your application.\n\n```bash\nnpm install @latitude-data/react\n```\n\nOnce the React package is installed in your project, add the LatitudeProvider:\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport { LatitudeProvider } from '@latitude-data/react';\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n  \u003cReact.StrictMode\u003e\n    \u003cLatitudeProvider\n      apiConfig={{ host: 'https://localhost:3000' }}\n    \u003e\n      \u003cExample /\u003e\n    \u003c/LatitudeProvider\u003e\n  \u003c/React.StrictMode\u003e,\n);\n```\n\nYou can fetch data from your Latitude data server with the useQuery hook:\n\n```jsx\nimport { useQuery } from '@latitude-data/react';\nimport { useCallback } from 'react';\n\nexport default function Example() {\n  const { data: movies, isFetching, compute } = useQuery({\n    queryPath: 'titles',\n    params: {\n      start_year: '2000',\n      end_year: '2020',\n    },\n  });\n\n  const caption = isFetching ? 'Loading movies...' : 'List of movies';\n  const refresh = useCallback(() =\u003e compute(), [compute]);\n\n  return (2\n    \u003cdiv className='p-4 flex flex-col gap-y-4'\u003e\n      \u003ch1 className='text-4xl font-medium'\u003eReact Example with Latitude\u003c/h1\u003e\n      \u003cButton onClick={refresh}\u003eRefresh\u003c/Button\u003e\n\n      \u003cTable\u003e\n        {!isFetching ? \u003cMovieList movies={movies!} /\u003e : \u003cMovieListSkeleton /\u003e}\n        \u003cTableCaption\u003e{caption}\u003c/TableCaption\u003e\n      \u003c/Table\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## 🖥️ Layout engine and iframe embedding\n\n### Use our layout engine\n\nIf you want to build standalone dashboards, you can use our layout engine to create a dashboard with multiple visualizations.\n\nTo do so, simply create an `index.html` file under the `views` directory with the following content:\n\n#### /views/index.html\n\n```jsx\n\u003cView class='gap-8 p-8'\u003e\n  \u003cRow\u003e\n    \u003cText.H2 class='font-bold'\u003eNetflix titles released over time\u003c/Text.H2\u003e\n  \u003c/Row\u003e\n  \u003cRow\u003e\n    \u003cLineChart query='titles-agg' x='release_year' y='total_titles' /\u003e\n  \u003c/Row\u003e\n  \u003cRow\u003e\n    \u003cTable query='titles' /\u003e\n  \u003c/Row\u003e\n\u003c/View\u003e\n```\n\nThis will create a dashboard with a line chart and a table displaying the data fetched from the `titles` and `titles-agg` queries.\n\nThis dashboard can be accessed by navigating to `http://localhost:3000/`.\n\nTo pass parameters to the queries, add them to the URL as query parameters. For example: `http://localhost:3000/?start_year=2000\u0026end_year=2020`.\n\nAnother option is to use our `\u003cInput\u003e` component to create a form that allows users to input parameters. Find out more about this in the [documentation](https://docs-analytics.latitude.so/views/components/inputs/text).\n\n### Embedding a standalone dashboard\n\nYou can embed the dashboard in your application using an iframe. To do so, simply add the following code to your application:\n\n```html\n\u003ciframe\n  src=\"http://localhost:3000/queries?start_year=2000\u0026end_year=2020\"\n  width=\"100%\"\n  height=\"600\"\n/\u003e\n```\n\nIf you're using React, we released a React component that simplifies the process of embedding dashboards in your application. [Check out the documentation](https://docs-analytics.latitude.so/guides/embed/react-embed) to learn more.\n\n## 🌍 Deploy\n\nTo deploy your Latitude project, run the following command:\n\n```bash\nlatitude deploy\n```\n\nThis will deploy your project to the Latitude cloud, and you will get a URL where your project is hosted.\n\nIf it's your first time deploying, make sure to log in or sign up to Latitude by running `latitude login` or `latitude signup` respectively.\n\nYou can also deploy your project to your own infrastructure. Find out more about this in the [documentation](https://docs-analytics.latitude.so/guides/deploy/docker).\n\n## 👥 Community\n\nThe Latitude community can be found on\n[Slack](https://trylatitude.slack.com/join/shared_invite/zt-17dyj4elt-rwM~h2OorAA3NtgmibhnLA#/shared-invite/email)\nwhere you can ask questions, voice ideas, and share your projects with other\npeople.\n\n## 🤝 Contributing\n\nContributions to Latitude are welcome and highly appreciated.\n\nIf you are interested in contributing, please join us on our [Slack\ncommunity](https://trylatitude.slack.com/join/shared_invite/zt-17dyj4elt-rwM~h2OorAA3NtgmibhnLA#/shared-invite/email),\nopen an [issue](https://github.com/latitude-dev/latitude/issues/new), or\ncontribute a pull request.\n\n## 🔗 Links\n\n- [Home page](https://latitude.so?utm_campaign=github-readme)\n- [Documentation](https://docs-analytics.latitude.so/)\n- [Slack community](https://trylatitude.slack.com/join/shared_invite/zt-17dyj4elt-rwM~h2OorAA3NtgmibhnLA#/shared-invite/email)\n- [X / Twitter](https://x.com/trylatitude)\n\n![scarf](https://static.scarf.sh/a.png?x-pxid=30def4cf-704f-435e-8dac-69a412e86cd6)\n","funding_links":[],"categories":["TypeScript","business-intelligence"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatitude-dev%2Flatitude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatitude-dev%2Flatitude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatitude-dev%2Flatitude/lists"}