-
Notifications
You must be signed in to change notification settings - Fork 42
feat: Add GitHub Codespaces support to Learning project #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "Gemini Learning - Pedagogical Concept Graph", | ||
| "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/git:1": {}, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {} | ||
| }, | ||
| "forwardPorts": [ | ||
| 3000 | ||
| ], | ||
| "portsAttributes": { | ||
| "3000": { | ||
| "label": "Learning App", | ||
| "onAutoForward": "notify" | ||
| } | ||
| }, | ||
| "postCreateCommand": "npm install", | ||
| "postStartCommand": "echo '🚀 Ready! Run: npm run dev' && echo '📝 Set GOOGLE_API_KEY in .env.local (copy from .env.example)'", | ||
| "remoteUser": "node" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Google Gemini API Key | ||
| # Get your API key from: https://aistudio.google.com/app/apikey | ||
| GOOGLE_API_KEY=your_api_key_here |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -98,9 +98,37 @@ learning/ | |||||||||
| └── NOTES.md # Detailed design documentation | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ## Getting Started | ||||||||||
|
|
||||||||||
| ### Prerequisites | ||||||||||
| ### 🚀 Quick Start with GitHub Codespaces | ||||||||||
|
|
||||||||||
| The fastest way to get started is using GitHub Codespaces - no local setup required! | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make it even easier for users to start a Codespace, you can add an "Open in GitHub Codespaces" badge. This provides a one-click way to launch the environment directly from the README.
Suggested change
|
||||||||||
|
|
||||||||||
| 1. **Open in Codespaces** | ||||||||||
| - Navigate to the [workshops repository](https://github.com/google-gemini/workshops) | ||||||||||
| - Click **Code** → **Codespaces** → **Create codespace on main** | ||||||||||
| - Wait for the environment to initialize (~2-3 minutes) | ||||||||||
|
|
||||||||||
| 2. **Set up your API key** | ||||||||||
| ```bash | ||||||||||
| cp .env.example .env.local | ||||||||||
| # Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey | ||||||||||
|
||||||||||
| cp .env.example .env.local | |
| # Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey | |
| # A .env.local file is automatically created for you when the Codespace starts. | |
| # Edit .env.local and add your GOOGLE_API_KEY from https://aistudio.google.com/app/apikey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @mscarpenter! Can you sign the CLA (see above); so we can merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @klutometis! I've signed the CLA and the checks are passing now. Ready for merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start for the devcontainer configuration! To make it even more seamless for developers, you could make a couple of improvements:
.env.localcreation: ThepostStartCommandcan be updated to automatically copy.env.exampleto.env.localif it doesn't exist. This saves the user a manual step.customizationsblock ensures everyone has a consistent and optimized development environment.Here is a suggested version incorporating these changes.
{ "name": "Gemini Learning - Pedagogical Concept Graph", "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye", "features": { "ghcr.io/devcontainers/features/git:1": {}, "ghcr.io/devcontainers/features/github-cli:1": {} }, "customizations": { "vscode": { "extensions": [ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "bradlc.vscode-tailwindcss" ] } }, "forwardPorts": [ 3000 ], "portsAttributes": { "3000": { "label": "Learning App", "onAutoForward": "notify" } }, "postCreateCommand": "npm install", "postStartCommand": "if [ ! -f .env.local ]; then cp .env.example .env.local && echo '✅ Created .env.local from .env.example.'; fi && echo '🚀 Ready! Run: npm run dev' && echo '📝 Set GOOGLE_API_KEY in .env.local'", "remoteUser": "node" }