scnmnt-web-app-core v0.1.0
template
capsule://quake0day/[email protected]
The main frontend application for SceneMint, built with Astro and React. It provides the user interface for image generation, prompt enhancement, quota management, and displays image history. It integrates with the backend API services.
Owns
- All application-specific React components for the image generator UI
- Frontend state management for image generation, history, and quota
- Client-side utilities for fingerprinting, HTTP requests, and history persistence
- Astro pages and configuration for the single-page application
- Public assets like logos and favicons
Does not own
- Generic UI components (delegated to scnmnt-web-ui-components)
- Backend API implementations
AI orientation
An agent working on this capsule would focus on frontend development, user experience, and integrating with backend APIs. They should be proficient in Astro, React, TypeScript, and understand client-side state management and API consumption.
Avoid
- Modifying backend Go code
- Changing the core logic of generic UI components
Provides
http_api:/— The main frontend single-page application.
Requires
http_api:/api/sessionfromscnmnt-security-middleware— To fetch CSRF tokens.http_api:/api/quota/*fromscnmnt-quota-service— To manage and display user quotas.http_api:/api/prompts/enhancefromscnmnt-image-generation-service— To enhance user prompts.http_api:/api/images/*fromscnmnt-image-generation-service— To generate images, check task status, and retrieve images.library:React UI Componentsfromscnmnt-web-ui-components— Generic UI components used to build the application interface.
Dependencies
Capsules
scnmnt-web-ui-components>=0.1.0
Invariants (must always hold)
- The application must correctly display image generation status and history.
- Quota information must be accurately reflected from the backend.
- All user interactions must be responsive and provide appropriate feedback.
Source files (30)
Click any file to view its content; the path on the right shows where the file lands when this capsule is installed.
src/web/.gitignore→.gitignoresrc/web/astro.config.mjs→astro.config.mjssrc/web/package.json→package.jsonsrc/web/public/apple-touch-icon.png→public/apple-touch-icon.pngsrc/web/public/brand-logo.png→public/brand-logo.pngsrc/web/public/favicon.ico→public/favicon.icosrc/web/public/favicon.png→public/favicon.pngsrc/web/public/robots.txt→public/robots.txtsrc/web/src/components/image-generator/BrandHeader.tsx→src/components/image-generator/BrandHeader.tsxsrc/web/src/components/image-generator/copy.ts→src/components/image-generator/copy.tssrc/web/src/components/image-generator/CurrentImagePanel.tsx→src/components/image-generator/CurrentImagePanel.tsxsrc/web/src/components/image-generator/FallbackImage.tsx→src/components/image-generator/FallbackImage.tsxsrc/web/src/components/image-generator/GeneratorForm.tsx→src/components/image-generator/GeneratorForm.tsxsrc/web/src/components/image-generator/HistoryPanel.tsx→src/components/image-generator/HistoryPanel.tsxsrc/web/src/components/image-generator/ImagePreviewLightbox.tsx→src/components/image-generator/ImagePreviewLightbox.tsxsrc/web/src/components/image-generator/preferences.ts→src/components/image-generator/preferences.tssrc/web/src/components/image-generator/QuotaPanel.tsx→src/components/image-generator/QuotaPanel.tsxsrc/web/src/components/image-generator/SizeOption.tsx→src/components/image-generator/SizeOption.tsxsrc/web/src/components/image-generator/useQuota.ts→src/components/image-generator/useQuota.tssrc/web/src/components/image-generator/useTaskPolling.ts→src/components/image-generator/useTaskPolling.tssrc/web/src/components/image-generator/utils.ts→src/components/image-generator/utils.tssrc/web/src/components/ImageGenerator.tsx→src/components/ImageGenerator.tsxsrc/web/src/lib/fingerprint.ts→src/lib/fingerprint.tssrc/web/src/lib/history.ts→src/lib/history.tssrc/web/src/lib/http.ts→src/lib/http.tssrc/web/src/lib/openaiStream.test.ts→src/lib/openaiStream.test.tssrc/web/src/lib/openaiStream.ts→src/lib/openaiStream.tssrc/web/src/lib/utils.ts→src/lib/utils.tssrc/web/src/pages/index.astro→src/pages/index.astrosrc/web/tsconfig.json→tsconfig.json
Plus capsule.yaml and
install.json.