Skip to content

feat: add Next.js web app with API client and session management#29

Merged
pafsmith merged 1 commit into
mainfrom
feat(web)/api-client
Apr 3, 2026
Merged

feat: add Next.js web app with API client and session management#29
pafsmith merged 1 commit into
mainfrom
feat(web)/api-client

Conversation

@pafsmith
Copy link
Copy Markdown
Owner

@pafsmith pafsmith commented Apr 3, 2026

Add Next.js web app with typed API client

Adds a complete Next.js application with TypeScript support and integration with the Studiqo API:

Web Application Setup

  • Configures Next.js app in apps/web with TypeScript and ESLint
  • Adds React Query for state management and API caching
  • Implements session management with access token handling and refresh token rotation
  • Creates development health check component to verify API connectivity
  • Adds date-time formatting utilities for API responses
  • Configures path aliases (@/*) for clean imports

API Client Package

  • Generates TypeScript types from OpenAPI specification using openapi-typescript
  • Creates typed HTTP client using openapi-fetch with automatic Bearer token injection
  • Implements error handling with normalized StudiqoApiError class
  • Provides response unwrapping utilities for clean error propagation
  • Exports modular client, error handling, and generated types

Development Configuration

  • Updates CORS settings to allow localhost:3001 for web app when API runs on port 3000
  • Configures Next.js to run on port 3002 by default to avoid conflicts
  • Adds environment configuration for API base URL
  • Includes .env.local in gitignore for local development settings
  • Provides comprehensive setup documentation in .env.example files

The web app includes a basic landing page that demonstrates API integration by fetching the health endpoint and formatting sample date-time data.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studiqo-api-web Ready Ready Preview, Comment Apr 3, 2026 11:08am

@pafsmith pafsmith changed the title feat: update CORS settings, add health check component, and enhance A… feat: add Next.js web app with API client and session management Apr 3, 2026
@pafsmith pafsmith merged commit bba8714 into main Apr 3, 2026
4 checks passed
@pafsmith pafsmith deleted the feat(web)/api-client branch April 8, 2026 12:48
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.

1 participant