Discover Twitter Spaces is an open-source SvelteKit web application that helps users find live Twitter Spaces using data from the Twitter API, exposing both a search UI and a public JSON API endpoint. The project is built by Navneet Sharma and released under the MIT License, and it is deployed on Vercel as a serverless application.
What is Discover Twitter Spaces?
Discover Twitter Spaces is a tool for discovering Twitter Spaces by querying Twitter's API. It takes a search term as input, for example bitcoin, and returns matching Spaces data through a web interface or via the /api/spaces endpoint with a query parameter such as /api/spaces?search=bitcoin. The application is built with SvelteKit and Svelte, written in TypeScript, and styled with Tailwind CSS and PostCSS. Redis and serverless functions are part of the stack, and the SvelteKit Vercel adapter handles deployment.
Key Features
- Searchable API endpoint — The /api/spaces endpoint accepts a search query parameter and returns Twitter Spaces data in JSON format, making it easy to consume programmatically.
- SvelteKit and Svelte — The application uses SvelteKit, which the README reports produces a much smaller total application size compared to React/Next.js or Vue equivalents.
- TypeScript throughout — The codebase, including the Twitter API route in src/routes/api/spaces/index.ts, is written in TypeScript for type safety.
- Tailwind CSS with PostCSS — Styling is handled with Tailwind CSS and PostCSS, providing utility-first styling and custom CSS processing.
- Twitter API integration — Space data is fetched from the Twitter API, with environment variables configured through a .env file (see .env.example for required fields).
- Redis and serverless functions — Redis is used in the application stack, and the API runs as a serverless function on Vercel.
- 100% Lighthouse score — The project reports a perfect Lighthouse score across the board, indicating strong performance and accessibility out of the box.
- MIT-licensed open source — The code and contributions are released under the MIT License, allowing free use and modification.
Who is it for?
- Twitter users and researchers — Search for active Twitter Spaces on specific topics by supplying keywords like bitcoin through the UI or the API.
- Developers — Use the public API endpoint to integrate Twitter Spaces discovery into other applications or dashboards.
- SvelteKit learners — Study a complete SvelteKit project that combines TypeScript, Tailwind CSS, Redis, serverless functions, and Vercel deployment as a reference.
- Contributors — The project encourages contributions through a dedicated contribution guide, issues, and discussions on GitHub.
What can you do with Discover Twitter Spaces?
- Search Spaces by keyword — Send a query parameter to the /api/spaces endpoint, such as /api/spaces?search=bitcoin, to get matching Twitter Spaces data.
- Deploy your own instance — Clone the repository, run yarn install, set the environment variables, and use yarn run dev for local development or yarn run build:vercel for production deployment on Vercel.
- Extend the project — Since the code is MIT-licensed, you can fork it, add features, and submit contributions following the contribution guidelines.
How does Discover Twitter Spaces work?
The project setup is straightforward: clone the repository from GitHub, install dependencies with yarn, copy the .env.example file to .env and fill in the required Twitter and Redis keys, then run yarn run dev for local development. To deploy, use yarn run build:vercel and then yarn run preview. The Twitter API route is implemented in src/routes/api/spaces/index.ts.
Alternatives
- find-twitter-space — A similar project referenced as the inspiration, built with React, that also helps users discover Twitter Spaces.
FAQ
Is Discover Twitter Spaces free?
Yes, the project is open-source and released under the MIT License, so the code is free to use, modify, and distribute. You will need your own Twitter API credentials to run the application.
What is the API endpoint for Discover Twitter Spaces?
The API endpoint is /api/spaces on the deployed application, and it accepts a search query parameter, for example /api/spaces?search=bitcoin, to return relevant Spaces data.
What tech stack does Discover Twitter Spaces use?
The application uses SvelteKit and Svelte, TypeScript, Tailwind CSS, PostCSS, the Twitter API, Redis, serverless functions, and the SvelteKit Vercel adapter.
Who created Discover Twitter Spaces?
The project was created by Navneet Sharma and is copyrighted as of 2021. It is inspired by the find-twitter-space project by Rakhisharma.
How do I run Discover Twitter Spaces locally?
Clone the repository, install dependencies with yarn install, set up the .env file based on .env.example, and run yarn run dev. For a production-style build, run yarn run build:vercel and then yarn run preview.








