How skysaksham/skyforms works
SkyForms is a form-building SPA backed by FastAPI: users authenticate, create or AI-generate forms, edit drafts, and can publish them. The frontend routes landing, home, editor, and publish pages; its sync layer caches user data locally and communicates with backend APIs. The backend verifies Google credentials, issues JWT sessions, generates questions through Groq, and persists draft and published-form changes. Some page, API, and database implementations are not sampled, so their internal wiring is shown only where documented or evidenced.
Main entry points: main.py HTTP API · route.js SPA router · syncClass.js State sync · main.js App startup
Components 24
Frontend experience
- SPA router
SkyForms_Frontend/route.js - App startup
SkyForms_Frontend/main.js - Landing page
SkyForms_Frontend/pages/landingPage.js - Forms home
SkyForms_Frontend/pages/homePage.js - Draft editor
SkyForms_Frontend/pages/editorPage.js - Publish page
SkyForms_Frontend/pages/publishPage.js - Form preview
SkyForms_Frontend/components/previewPublish.js - Draft model
SkyForms_Frontend/logic/draftClass.js - State sync
SkyForms_Frontend/logic/syncClass.js - Browser cache
- Google sign-in
SkyForms_Frontend/api/googleAuth.js - Question API client
SkyForms_Frontend/api/llmResponse.js
Backend services
- HTTP API
SkyForms_Backend/main.py - Question generation
SkyForms_Backend/services/get_questions_llm.py - Google token verification
SkyForms_Backend/services/verify_google_id_token.py - JWT sessions
SkyForms_Backend/services/create_verify_jwt.py
Data persistence
- User data access
SkyForms_Backend/db/get_userdata.py - User records
SkyForms_Backend/db/user.py - Draft persistence
SkyForms_Backend/db/update_draft_forms.py - Published forms
SkyForms_Backend/db/submit_draft.py
External integrations
- PostgreSQL
- Google identity
- Groq API
Other components
- Form creator
Connections 33
- Form creator → SPA router: uses
- SPA router → Landing page: routes to
- SPA router → Forms home: routes to
- SPA router → Draft editor: routes to
- SPA router → Publish page: routes to
- App startup → SPA router: initializes
- App startup → State sync: creates
- App startup → State sync: loads state
- App startup → HTTP API: verifies session
- Draft editor → Draft model: edits draft
- Draft editor → SPA router: navigates
- Publish page → Form preview: renders preview
- Google sign-in → Google identity: gets credentials
- Google sign-in → HTTP API: signs in
- Google sign-in → State sync: sets user state
- Forms home → Question API client: requests questions
- Question API client → HTTP API: posts prompt
- HTTP API → Question generation: generates questions
- Question generation → Groq API: requests completion
- HTTP API → Google token verification: verifies identity
- Google token verification → Google identity: checks token
- HTTP API → JWT sessions: issues or verifies
- HTTP API → User records: looks up or creates
- HTTP API → User data access: fetches user data
- HTTP API → Draft persistence: reads or writes drafts
- HTTP API → Published forms: submits form
- State sync → Browser cache: reads or writes
- State sync → HTTP API: syncs drafts
- State sync → HTTP API: fetches home data
- User data access → PostgreSQL: queries
- User records → PostgreSQL: queries
- Draft persistence → PostgreSQL: reads or writes
- Published forms → PostgreSQL: writes