An AI-powered, interactive learning platform designed to master the Aztec Network. This application provides a guided journey from foundational privacy concepts to advanced smart contract development and dApp deployment, tailored for all skill levels.
- Interactive AI Chat: Learn through a conversational interface powered by the Google Gemini API.
- Comprehensive Curriculum: A structured learning path covering everything from "What is Aztec?" to building a complete dApp.
- Selectable AI Personas: Choose your teacher's personality—from an Empathetic Mentor to a Pragmatic Developer—to match your learning style.
- Dual Skill Levels: Toggle between 'Beginner' and 'Developer' modes to get explanations tailored to your expertise.
- Advanced Code Blocks: Enjoy IDE-like code blocks with syntax highlighting (Dracula theme), line numbers, copy-to-clipboard, and a one-click "Explain Code" feature.
- Searchable Knowledge Base: Instantly search the entire curriculum to find the exact information you need.
- Rich Content Rendering: Full markdown support, including clickable links and asynchronous URL previews for a richer learning experience.
- Fully Responsive: A seamless experience whether you're on a desktop or a mobile device.
- Frontend: React, TypeScript, Tailwind CSS
- AI: Google Gemini API (
@google/genai) - Syntax Highlighting:
react-syntax-highlighter
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
You will need Node.js (v18 or later) installed on your machine.
-
Clone the repository:
git clone https://github.com/Atunde-SS/Aztec-AI.git cd Aztec-AI -
API Key Configuration: This application requires a Google Gemini API key to function. The app has a smart key handling mechanism:
- For Public Users (or if no dev key is provided): The app will prompt the user to enter their own API key, which is then stored securely in their browser's local storage.
- For Local Development: You can bypass the user prompt by providing your own key. Create a file named
.envin the root of the project and add your API key:
# .env API_KEY="YOUR_GOOGLE_GEMINI_API_KEY"You can get your free API key from Google AI Studio.
This project is a modern static web app and should be served by a local development server to handle module imports correctly.
-
Install a simple server (if you don't have one):
npm install -g serve
-
Run the server from the project root:
serve . #or npm run dev
The application will now be running at a local URL (e.g.,
http://localhost:3000).
You can easily deploy this application to any static hosting service like Vercel, Netlify, or GitHub Pages.
- Push your cloned repository to your own GitHub, GitLab, or Bitbucket account.
- Create a new project on Vercel or Netlify and connect it to your repository.
- No special build commands are needed. Use the default settings for a static site.
- (Optional but Recommended) To avoid prompting every user for an API key, you can set your own key as an environment variable in your Vercel/Netlify project settings.
- Variable Name:
API_KEY - Variable Value: Your Google Gemini API Key
- Variable Name:
The application prioritizes API keys in the following order:
- Developer Environment Key: It first checks for an API key provided by the development environment (e.g., the
.envfile when running locally). - User's Local Storage: If no developer key is found, it checks the browser's
localStoragefor a key the user may have previously saved. - User Prompt: If no key is found in either of the above locations, it displays the pop-up modal, asking the user to provide their key.
This ensures a smooth experience for developers while making the public application secure and functional for non devs.
Happy learning, and happy building on Aztec!
