A private, ultimate-secure, and always-free digital canvas and spatial mind-map. Save notes, links, and files directly to your Google Drive with zero tracking or subscription fees. Powered by Gemini AI to organize, map, and chat with your thoughts.
MyMindSpace runs entirely client-side inside the user's browser, communicating directly with Google Drive for data storage. For AI features, it communicates with Vercel serverless functions which proxy requests to the Google Gemini API.
graph TD
A[Client Browser / Frontend] -->|Auth & Sync JSON data| B(Google Drive API)
A -->|POST /api/gemini| C[Vercel Serverless Function]
C -->|Proxy API Request| D[Google Gemini API]
MyMindSpace checks and resolves the Gemini API key in the following order of precedence:
-
Client-Side Settings (Local Storage):
- Users can input their own Gemini API key inside the app's Settings (⚙️) panel.
- If configured, this key is saved in browser local storage (
mymind_gemini_key) and sent with requests to/api/gemini?key=<YOUR_KEY>.
-
Server-Side Environment Variable:
- If the request to
/api/geminidoes not include a client-side key, the serverless proxy fallback is activated. - If the logged-in user email is
chakshu.grover8@gmail.com, the API handler retrieves the key fromprocess.env.GEMINI_API_KEYdefined on the server side (Vercel).
- If the request to
-
Client-Side Fallback Tagging:
- If no API key is specified and the user is not the designated owner, the app falls back to client-side automatic tagging (
mockAnalysisinapp.js) without querying the API.
- If no API key is specified and the user is not the designated owner, the app falls back to client-side automatic tagging (
Since the project is already structured for Vercel (complete with vercel.json and a serverless api/ directory), deployment is straightforward.
Ensure your repository is pushed to your Git provider (e.g., GitHub):
git add .
git commit -m "Add README and documentation"
git push origin main- Go to your Vercel Dashboard.
- Click Add New > Project.
- Import the repository
my-mindspace.
Before deploying, add the following environment variable in the Vercel project configuration page:
- Key:
GEMINI_API_KEY - Value: Your Google AI Studio Gemini API Key
Since MyMindSpace accesses Google Drive, the Google Client ID needs to authorize your Vercel deployment domain:
- Go to the Google Cloud Console.
- Select your project and navigate to APIs & Services > Credentials.
- Edit your OAuth 2.0 Client ID.
- Add your Vercel deployment URL (e.g.,
https://mymindpalace.vercel.app) to both:- Authorized JavaScript origins
- Authorized redirect URIs (if applicable)
- Save changes.
To run the project locally without deploying:
- Install Vercel CLI (optional, to run serverless functions locally):
npm i -g vercel
- Start the local dev server:
Alternatively, run a local Python HTTP server if you do not need serverless functions:
vercel dev
python3 server.py