Your AI-powered Formula 1 Companion
LightsOut is a Retrieval-Augmented Generation (RAG) chatbot focused on Formula 1 racing. The application provides an interactive way to learn about F1 history, statistics, and current events by intelligently retrieving and synthesizing information from its knowledge base.
This app is still under development and a lot of features are yet to be fully functional.
As I am using my own API keys, I have added access control to the app to prevent misuse. You can set your own access key using the NEXT_PUBLIC_ACCESS_KEY
environment variable.
-
Frontend
- Next.js 14 (React)
- TypeScript
- Tailwind CSS
- Lucide Icons
- Vercel (Deployment)
-
Backend & AI
- Gemini 2.0 Flash Lite API (OpenRouter)
- Astra DB (Vector Database)
- LangChain
- Xenova Transformers (Text Embeddings)
- Puppeteer (Web Scraping)
Visit https://lightsout.bhavyadang.in to try the live version. But, it is recommended to run the app locally as it my needs access key.
- AI-powered F1 knowledge base
- Access control with a secret key
- Dark/Light mode support
- Interactive chat interface
- Responsive design for all devices (WIP)
- Real-time message streaming
- Message editing and regeneration
- Copy message functionality
- Command system with suggestions
- Modern, clean UI with smooth animations
- Node.js 18.x or later
- npm or yarn package manager
- OpenRouter API key
-
Clone the repository:
git clone https://github.com/bhavya-dang/lightsout.git cd lightsout
-
Install dependencies:
npm install # or yarn install
-
Create a
.env.local
file in the root directory with the following variables:AI_API_KEY=your_api_key_here ASTRA_DB_NAMESPACE="default_keyspace" # do not change this ASTRA_DB_COLLECTION=your_collection_name_here ASTRA_DB_TOKEN=your_db_token_here ASTRA_DB_ENDPOINT_URL=your_astra_db_endpoint_url_here NEXT_PUBLIC_ACCESS_KEY=your_access_key_here
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser.
-
Login with the access key.
-
Only share the access key with trusted individuals.
The app includes a command system that can be accessed by typing '@' in the input field:
@help
- Shows available commands@clear
- Clears the chat history
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you encounter any issues or have questions, please open an issue in the GitHub repository.