{"id":28505394,"url":"https://github.com/thewhitefox/survey-tool-app","last_synced_at":"2025-07-04T14:31:20.942Z","repository":{"id":294640353,"uuid":"987612131","full_name":"theWhiteFox/survey-tool-app","owner":"theWhiteFox","description":"Lightweight Survey Tool","archived":false,"fork":false,"pushed_at":"2025-06-07T11:47:46.000Z","size":1177,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T12:28:01.976Z","etag":null,"topics":["bun","next","react","recharts","typescript","workspaces"],"latest_commit_sha":null,"homepage":"https://survey-tool-app.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theWhiteFox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-21T10:28:10.000Z","updated_at":"2025-06-07T11:47:49.000Z","dependencies_parsed_at":"2025-06-07T12:33:13.104Z","dependency_job_id":null,"html_url":"https://github.com/theWhiteFox/survey-tool-app","commit_stats":null,"previous_names":["thewhitefox/survey-tool-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theWhiteFox/survey-tool-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theWhiteFox%2Fsurvey-tool-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theWhiteFox%2Fsurvey-tool-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theWhiteFox%2Fsurvey-tool-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theWhiteFox%2Fsurvey-tool-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theWhiteFox","download_url":"https://codeload.github.com/theWhiteFox/survey-tool-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theWhiteFox%2Fsurvey-tool-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263556977,"owners_count":23480105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","next","react","recharts","typescript","workspaces"],"created_at":"2025-06-08T19:07:22.929Z","updated_at":"2025-07-04T14:31:20.928Z","avatar_url":"https://github.com/theWhiteFox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📝 Lightweight Survey Tool\n\nA comprehensive survey application built with **Next.js 14**, **TypeScript**, and **Tailwind CSS**. This tool enables users to browse surveys, complete them via dynamically rendered forms, and receive immediate feedback on submission, all while demonstrating robust client-side validation with Zod.\n\n---\n\n## 📦 Getting Started\n\n1. Clone the repo\n\n```bash\ngit clone https://github.com/theWhiteFox/survey-tool-app.git\ncd survey-tool-app\n```\n\n2. Install dependencies\n\n```bash\nbun install \n# or \nnpm install\n```\n\n3. Configure environment variables\n\nCreate a .env.local file in the root of the project:\n\n```\nNEXT_PUBLIC_APP_BASE_URL=http://localhost:3000\nAPI_TOKEN=your_api_token_here # Replace with your actual API token\n``` \n_The API_TOKEN is necessary for authenticating requests to the Workspace API. The `NEXT_PUBLIC_APP_BASE_URL` is used for constructing absolute URLs when making server-side API calls._\n\n4. Start the dev server\n\n```bash\nbun dev\n# or\nnpm run dev\n``` \n\n### Running locally this is what you will see 🤞\n\nOpen http://localhost:3000 in your browser. Click the link to the surveys to see a list of available surveys.\n\n![localhost-running-app.jpg](./public/localhost-survey-tool.jpg)\n\n## 🗂 Project Structure\n\n```bash\nsurvey-tool-app/\n├── public/\n├── src/\n│   ├── app/\n│   │   ├── components/              # Reusable UI components for the app directory\n│   │   │   ├── QuestionField.tsx    # Renders individual input fields based on question type\n│   │   │   ├── ResponsesTable.tsx   # Displays a table of survey responses\n│   │   │   ├── SurveyForm.tsx       # Client-side form component handling submission and validation\n│   │   │   └── SurveysTable.tsx     # Displays a table of available surveys\n│   │   ├── lib/\n│   │   │   ├── mock-data/           # Folder for mock API responses\n│   │   │   │   ├── surveys.ts       # Mock data for survey list\n│   │   │   │   └── response-q1.ts   # Mock data for individual question responses (example)\n│   │   │   ├── data.ts              # Centralized API calls, authentication headers\n│   │   │   └── schemas.ts           # Zod schemas for API response structures AND client-side form validation\n│   │   ├── globals.css              # Global styles for the application\n│   │   ├── layout.tsx               # Root layout for the application\n│   │   ├── page.tsx                 # Home page (redirects to /surveys)\n│   │   └── surveys/\n│   │       ├── [surveyId]/          # Dynamic page for individual surveys (Server Component)\n│   │       │   └── page.tsx\n│   │       ├── responses/           # Folder for displaying survey responses/results\n│   │       │   ├── [questionId]/    # Dynamic page for individual question responses\n│   │       │   │   └── page.tsx\n│   │       │   └── page.tsx         # Survey list page (Server Component)\n├── .env.local                       # Environment variables (API keys, base URLs)\n├── next.config.js                   # Next.js configuration (no rewrites needed as CORS is handled by API)\n├── package.json                     # Project dependencies and scripts\n├── tsconfig.json                    # TypeScript configuration\n└── README.md                        # Project documentation\n```\n\n## 📝 Learning Reflection\n\nThis project was a valuable journey into building a robust and user-friendly frontend application integrated with a real API.\n\nRead more [From 500 Errors to UX Wins: API Debugging in a Real-World Next.js 14 Apps](https://www.thewhitefoxdev.blog/blog/survey-tool-next)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthewhitefox%2Fsurvey-tool-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthewhitefox%2Fsurvey-tool-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthewhitefox%2Fsurvey-tool-app/lists"}