A full-stack poll application built with Svelte (frontend) and FastAPI (backend).
- Create questions
- Submit answers to specific questions
- View all answers for a question
Frontend:
- SvelteKit https://kit.svelte.dev
- TypeScript https://www.typescriptlang.org
- Vite https://vitejs.dev
Backend:
- FastAPI https://fastapi.tiangolo.com
- SQLModel (SQLite) https://sqlmodel.tiangolo.com
- SQLite https://www.sqlite.org
Dev Tools:
- Vite Proxy https://vitejs.dev/config/server-options.html#server-proxy
- uv / uvicorn https://www.uvicorn.org
- npm https://www.npmjs.com
See:
- Introduce backend route for
GET /question/{id}/answers(avoids filtering client-side). - Introduce routers/modules for better structure (
questions,answers,stats). - Add schemas for validation and explicit typing.
- Build proper database migrations.
- Add efficient endpoint for fetching answers for a specific question.
- Add authentication/authorization layer (admin interface visits is public).
- Create small API client wrapper for fetch calls.
- Global error-handling strategy, add reusable components for errors, loading states, and forms.
- Apply a scale-based spacing and typography system for visual consistency.
- Improve responsive layout behavior.
- Consider complying with A11y standards.
- Add FastAPI tests for new endpoints.
- Add Vitest component tests for question/answer flows.
- Include linting & formatting checks in CI.