This chat application is designed to leverage the power of a Large Language Model (LLM), such as OpenAI's GPT, to assist users in discovering environmental subsidies that align with their specific requirements. The app simplifies the process of navigating through complex policies, terms, and regional programs to identify subsidies that users might qualify for.
Interface :
- Built with Next.js 15 for fast and SEO-friendly rendering
- Styled with Tailwind CSS 3, a utility-first CSS framework
API :
- Powered by Node.js for a scalable, non-blocking JavaScript runtime environment
- Built with Express 4, a minimal and flexible Node.js framework for handling API routing and middleware
- Integrated with MongoDB, a NoSQL, document-oriented database for flexible and scalable data storage
- Leveraging OpenAI API to utilize cutting-edge AI models for intelligent features
Both :
- Developed using TypeScript 5 for robust type checking and maintainability
- Dockerized for quick local deployment
Before you begin, make sure you have the following installed on your machine:
- Node.js (v18.18.0 or later) – Download Node.js
- npm – comes with Node.js or can be installed separately
If you want to deploy using docker and docker compose :
- Docker (v20.10 or later)
- Docker Compose (v2.0 or later) The easiest and recommended way to get Docker and Docker Compose is to install Docker Desktop. It includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
-
Clone the repository
git clone https://github.com/antoineludeau/environmental-subsidies-ai-finder.git cd environmental-subsidies-ai-finder
-
Env variables
- Copy the .env.sample file into a .env file
- Enter a valid OPENAI_API_KEY (replacing "your_openai_api_key" in the .env file)
To get an OpenAI API key : https://platform.openai.com/api-keys
- Build & Run using Docker and Docker Compose
You can build and run the application locally using Docker & Docker Compose :
Simply run the command :
docker compose up --build -d
This command will build and run 3 services :
- interface (Next.js)
- api (Express)
- database (MongoDB) - the mongodb instance is initialized with environmental subsidies data
Open http://localhost:3000 in your browser to view the application.
environmental-subsidies-ai-finder/
├── api/ # API code folder
│ ├── mongo/ # Mongo init scripts
│ ├── src/ # Source code folder
│ ├── .dockerignore # Docker ignore file
│ ├── .env.sample # Env sample file to copy as .env file
│ ├── .gitignore # Git ignore file
│ ├── compose.yml # Docker Compose configuration
│ ├── Dockerfile.dev # Docker configuration for development
│ ├── nodemon.json # Docker configuration for development
│ ├── package-lock.json # Lock file for npm dependencies
│ ├── package.json # Project dependencies and scripts
│ └── tsconfig.json # TypeScript configuration file
├── interface/ # interface code folder
│ ├── app/ # Next.js 'app' directory for routing and pages
│ ├── public/ # Static assets (images, fonts, etc.)
│ ├── .dockerignore # Docker ignore file
│ ├── .env.sample # Env sample file to copy as .env file
│ ├── .eslintrc.json # ESLint configuration file
│ ├── .gitignore # Git ignore file
│ ├── Dockerfile.dev # Docker configuration for development
│ ├── next.config.mjs # Next.js configuration file
│ ├── package-lock.json # Lock file for npm dependencies
│ ├── package.json # Project dependencies and scripts
│ ├── postcss.config.mjs # PostCSS configuration for Tailwind CSS
│ ├── tailwind.config.ts # Tailwind CSS configuration
│ └── tsconfig.json # TypeScript configuration file
├── .env.sample # Env sample file to copy as .env file
├── .gitignore # Git ignore file
├── compose.yml # Docker Compose configuration
├── LICENSE.md # License file
├── README.md # Documentation for the project
This project is licensed under the MIT License. See the LICENSE file for details.