← Về thư mục
System Architecture: How Everything Works Together
This guide explains the relationship between the different parts of your project.
1. The Roles
| Component |
Role |
Where it lives |
| Antigravity (Me) |
The Developer. I am the AI architect helping you build the code. |
Inside your Cursor/IDE. |
| Vedic Astro Guide |
The Website. This is the tool you use to see charts and perform readings. |
http://localhost:3000 (Your Browser). |
| Ollama |
Local Brain. A helper that does technical thinking on your own computer. |
http://localhost:11434 (Background Task). |
| Gemini (Google) |
Cloud Brain. A spiritual guide that does complex reasoning on Google's servers. |
In the Cloud (API Key required). |
2. The Old Workflow vs. The New Workflow
Old Workflow (Before Ollama)
- You input data into Website (
localhost:3000).
- Website sends data to Google Gemini (Cloud).
- Problem: If you do 20 readings, Google says "Stop! You are at your limit" (Error 429).
- Result: Your website stops working until tomorrow.
New Workflow (With Ollama)
- You input data into Website (
localhost:3000).
- Website checks your computer for Ollama (Local).
- Ollama does the heavy technical extractions (Screen 2 & Screen 4).
- Benefit: NO QUOTAS. You can do 1,000 readings a day for $0.
- Special Use Case: You only send the final interpretation to Gemini (Cloud) for the high-level spiritual summary to save your precious Google quota.
3. How to use it properly
- Start the engine (Ollama) in your terminal:
OLLAMA_ORIGINS="*" ollama serve
- Open the website in your browser:
http://localhost:3000
- Use the app as normally!
The app will automatically detect if Ollama is running and use it. If it's not running, it will gracefully switch to Gemini.
4. Why did I change the code?
I updated the Website code so it is smart enough to "look" for Ollama on your computer. If it finds it, it uses it. If it doesn't, it doesn't crash—it just calls Google like it used to.