Skip to content

add swagger docs on api and make run inc frontend#6

Merged
robmsmt merged 1 commit into
mainfrom
robmsmt/frontend-changes
Mar 18, 2026
Merged

add swagger docs on api and make run inc frontend#6
robmsmt merged 1 commit into
mainfrom
robmsmt/frontend-changes

Conversation

@robmsmt
Copy link
Copy Markdown
Contributor

@robmsmt robmsmt commented Mar 18, 2026

No description provided.

@robmsmt robmsmt requested a review from Copilot March 18, 2026 08:50
@robmsmt robmsmt merged commit a03893a into main Mar 18, 2026
4 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}/docs on the API key page.
  • Add an “export CSCS_SERVING_API=…” snippet and populate it with the fetched API key.
  • Update make run to run uvicorn and npm run dev concurrently.

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 thread Makefile
Comment on lines +23 to +25
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8080 & \
cd frontend && npm run dev & \
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants