add swagger docs on api and make run inc frontend#6
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the frontend API key page to surface API (Swagger) documentation and improve local developer ergonomics, and updates the root make run target to start both backend and frontend dev servers together.
Changes:
- Add an “API Documentation” card linking to
${apiUrl}/docson the API key page. - Add an “export CSCS_SERVING_API=…” snippet and populate it with the fetched API key.
- Update
make runto runuvicornandnpm run devconcurrently.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
frontend/src/pages/api_key.astro |
Adds Swagger docs link + env export snippet; introduces a dev-mode auth bypass. |
Makefile |
Runs backend and frontend dev servers concurrently under make run. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
27
| // Detect local development | ||
| const isDev = import.meta.env.DEV; | ||
|
|
||
| // If not authenticated, redirect to home page | ||
| if (!session) { | ||
| return Astro.redirect('/'); | ||
| let session; | ||
| if (isDev) { | ||
| // Dummy session for local development — bypasses Auth0 | ||
| session = { | ||
| user: { name: 'Dev User', email: 'dev@localhost' }, | ||
| accessToken: 'dev-dummy-token', | ||
| }; | ||
| } else { | ||
| // Check if user is authenticated | ||
| session = await getSession(Astro.request); | ||
| if (!session) { | ||
| return Astro.redirect('/'); | ||
| } | ||
| } |
Comment on lines
+23
to
+25
| uvicorn backend.main:app --reload --host 0.0.0.0 --port 8080 & \ | ||
| cd frontend && npm run dev & \ | ||
| wait |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.