Commit graph

86 commits

Author SHA1 Message Date
github-actions[bot]
39e3764e2c chore: update performance metrics from CI [skip ci] 2026-06-10 20:25:04 +00:00
3fd4063730
style: remove redundant form-list and schema-modal CSS rules to resolve Angular style budget warning 2026-06-11 01:53:38 +05:30
github-actions[bot]
d7d6df8dbe chore: update performance metrics from CI [skip ci] 2026-06-10 20:21:04 +00:00
94bf758a74
fix: construct MongoDB URI without credentials when they are empty 2026-06-11 01:49:35 +05:30
dbaba1c315
Refactor backend and frontend services, add unit tests, configure Ruff and Vitest, and delegate frontend state 2026-06-11 01:47:52 +05:30
github-actions[bot]
a7cda4faf0 chore: update performance metrics from CI [skip ci] 2026-06-10 11:36:38 +00:00
0d43264684
fix the upload state not updating 2026-06-10 17:04:46 +05:30
github-actions[bot]
f285db2b5c chore: update performance metrics from CI [skip ci] 2026-06-09 18:18:37 +00:00
8770a2f7f9
optimize db fetches 2026-06-09 23:46:05 +05:30
github-actions[bot]
8dde77c128 chore: update performance metrics from CI [skip ci] 2026-06-02 09:42:16 +00:00
efe14f67a2
fix: preserve previous perf metrics when MongoDB unavailable; fix delete ID parsing
- update_readme_metrics.py: fall back to existing README values instead of
  overwriting with "N/A (MongoDB not connected)" when metrics are unavailable
- measure_perf.py: fix uploaded_id extraction — ParsedForm.id is top-level,
  not nested under a "form" key, so delete timing now actually runs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 15:09:46 +05:30
github-actions[bot]
d3190c78b9 chore: update performance metrics from CI [skip ci] 2026-06-02 09:32:47 +00:00
a53c17b499
claude security audit fixes 2026-06-02 15:00:33 +05:30
github-actions[bot]
1adcc532b0 chore: update performance metrics from CI [skip ci] 2026-06-02 08:45:20 +00:00
10a676363c
test for perf ci 2026-06-02 14:12:52 +05:30
lakshit verma
b498b369c8
Revise README with live links and screenshots
Updated the README to include live links and screenshots, and removed the contributing section.
2026-06-02 14:07:58 +05:30
13e119c425
docs: remove horizontal rules from READMEs [skip ci] 2026-06-02 14:01:37 +05:30
github-actions[bot]
3b1c8a80df chore: update performance metrics from CI [skip ci] 2026-06-02 08:30:25 +00:00
8b13ec7071
docs: slim down root README, move detail into folder READMEs
Root README now has: one-liner description, live links, screenshot
placeholders, CI-updated perf table, stack summary, short contributing.

backend/README.md: full API reference, file format, DB schema, testing.
frontend/README.md: setup, runtime config, structure, features, testing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:58:36 +05:30
github-actions[bot]
82f8f48f33 chore: update performance metrics from CI [skip ci] 2026-06-02 08:22:02 +00:00
962394155d
feat: add CI perf-metrics job to benchmark deployed API and update README
- scripts/measure_perf.py — times validation, parsing, upload, delete
  against the live Render deployment; saves perf_results.json
- scripts/update_readme_metrics.py — reads results and rewrites the
  Performance Metrics Table in README.md with live numbers + timestamp
- ci.yml — new perf-metrics job (push to main only) runs after
  backend-tests pass, commits updated README back to the repo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:49:30 +05:30
252cb503fe
fix: skip loadForms during SSR to prevent localhost fallback error
During server-side rendering main.ts never runs, so loadRuntimeConfig()
is never called and apiUrl falls back to localhost:8000. The failed HTTP
call triggers the error snackbar during client hydration. Guard loadForms
with isPlatformBrowser so it only runs in the browser where the config
is correctly loaded.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:44:34 +05:30
b9bf24ef71
fix: handle OPTIONS preflight before routing to fix CORS 400
The fallback middleware was calling call_next first, so OPTIONS hit the
router (no handler → 400) before headers could be injected. Intercept
OPTIONS early and return 200 with CORS headers directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:38:45 +05:30
5b209c718c
fix: upgrade openpyxl to >=3.1.5 for pandas 3.x compatibility
pandas 3.0+ requires openpyxl 3.1.5+. The pinned 3.1.2 caused all
Excel file reads to fail with a version error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:31:35 +05:30
afc9f6b06d
fix: add fallback CORS middleware to guarantee Access-Control-Allow-Origin
CORSMiddleware only fires when Origin header reaches the app. Cloudflare or
proxy layers can strip it before the middleware sees it. The fallback http
middleware ensures the header is always present when Origin is in the request.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:27:37 +05:30
fc74d0b539
fix: set allow_credentials=False to fix CORS with wildcard origin
allow_credentials=True + allow_origins=["*"] is invalid per the CORS spec.
Starlette drops the Access-Control-Allow-Origin header in this case.
The API uses no cookies so credentials are not needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:23:56 +05:30
336b6c2659
fix: move config.json to public/assets so it's included in Angular build
angular.json assets glob covers public/ not src/assets/, so config.json
was never copied to the build output and the runtime fetch was falling
back to localhost:8000.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:20:17 +05:30
07d2dc3cb0
fix: add config.json with production backend URL for Vercel deployment
Without this file the frontend fell back to localhost:8000, causing CORS
failures on the deployed Vercel app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:12:20 +05:30
7dc8a65522
fix: use certifi CA bundle to fix TLS handshake with MongoDB Atlas
tlsCAFile=certifi.where() is the correct pymongo parameter to supply the
Mozilla CA bundle, resolving TLSV1_ALERT_INTERNAL_ERROR on both Python
3.11 and 3.14 when connecting to Atlas over TLS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:00:36 +05:30
29a6379370
fix: run MongoDB connect in background so HTTP port binds immediately
Blocking startup_event on connect_to_mongo() prevented the server from
opening its port when Atlas was slow or unreachable, causing Render to
wait indefinitely. Connection now runs as a background task.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:59:48 +05:30
21c618ae78
fix: remove invalid ssl_context kwarg from AsyncIOMotorClient
pymongo does not accept ssl_context as a constructor argument. Python 3.11
(now enforced via .python-version) handles Atlas TLS fine without it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:46:25 +05:30
0563cd22eb
fix: resolve MongoDB Atlas SSL handshake failure on Python 3.14/OpenSSL 3.x
OpenSSL 3.x defaults to security level 2 which drops cipher suites Atlas needs.
Create an explicit SSL context at SECLEVEL=1 so TLS negotiation succeeds on any
Python version. Also add .python-version to steer Render toward Python 3.11.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:42:49 +05:30
33da274d7e
fix: pin Python to 3.11 to resolve MongoDB Atlas TLS handshake failure
Python 3.14 on Render has OpenSSL incompatibilities causing TLSV1_ALERT_INTERNAL_ERROR
when connecting to MongoDB Atlas. Pinning to 3.11.9 resolves the SSL negotiation issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:38:44 +05:30
708e72a3d5
update pymongo 2026-06-02 12:31:54 +05:30
1bf03fe499
add gunicorn 2026-06-02 12:28:45 +05:30
1c0338539e
feat: add Vercel deployment config and runtime API URL loading
- Add vercel.json with Angular build config and SPA rewrites
- Increase Angular bundle budgets to unblock production build
- Fix TS strict null error in runtime-config.ts (return _config ?? {})
- Load API_URL from /assets/config.json at bootstrap via prebuild script
- Wire getRuntimeConfig() into FormService instead of hardcoded localhost

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:21:52 +05:30
d247ab12a2
add test var 2026-06-02 12:16:26 +05:30
6d1da0ec2e
add test env 2026-06-02 12:12:45 +05:30
77e0887c67
add envars 2026-06-02 11:59:02 +05:30
db78c330ee docs: update performance metrics and recent testing activity in README
- Revised performance metrics with updated data from September 2025 testing.
- Enhanced recent testing activity section to reflect new testing dates and results.
- Improved clarity in performance summary with updated ranges for validation, parsing, upload, and delete operations.
2025-09-16 05:38:33 +05:30
5d50cf93e1 docs: update README files and enhance and finalize documentation 2025-09-11 21:34:43 +05:30
66e8aecee5 feat: enhance upload component with async processing and improved control
- Added support for concurrent file uploads with a maximum limit.
- Implemented async processing for file uploads, allowing for pause, resume, and cancel functionality.
- Introduced an AbortController to manage ongoing uploads and handle cancellation.
- Updated UI feedback for upload status and error handling.
- Refactored upload logic to improve state management and user experience.
2025-09-11 20:58:47 +05:30
94a35c90d6 feat: enhance form upload component and parsing logic
- Refactored methods to extract form details such as title, language, version, questions count, and options count.
- Updated XLSFormParser to use default form IDs and improved data conversion from tempData.json.
- Adjusted the getFormById method to return a more flexible response type.
2025-09-11 20:45:23 +05:30
86a45d02da feat: update file parsing to return the actual mForm format
- Modified the parse_file endpoint to return data in mForm comptaible format instead of the previous schema.
- Updated the get_form_by_id endpoint to return forms in the new tempData.json format.
- Enhanced XLSFormParser to support the conversion of database format to tempData.json format.
- Adjusted tests to validate the new response structure for parsed forms.
2025-09-11 16:47:17 +05:30
00ded49a4c fix: update upload component button dimensions and icon sizes 2025-09-03 17:21:10 +05:30
d9d5b43edc feat: enhance upload component with pause, resume, and cancel functionality
- Added buttons to pause, resume, and cancel file uploads.
- Improved upload progress display to show current file status.
- Implemented session storage to restore upload state after page refresh.
- Refactored file upload logic to handle individual file uploads and track progress.
2025-09-03 17:14:34 +05:30
95ae4eb5ee docs: add compression notes back 2025-09-02 03:10:39 +05:30
6951569983 feat: enhance form metadata handling and UI updates
- Added default values for 'version' and 'created_at' fields in the database service.
- Updated XLSFormParser to parse and include 'version' and 'created_at' from the form metadata.
- Changed font from 'Roboto' to 'Inter' across frontend components for consistency.
- Improved upload component to display default values for 'language', 'version', and 'created_at' in the form details.
- Adjusted progress display messages for clarity during file uploads.
2025-08-27 16:00:10 +05:30
8eba3533dc docs: overhaul README to enhance project clarity and structure
- Updated project title and description to reflect the comprehensive nature of the application.
- Expanded sections on architecture, technology stack, and system requirements.
- Added detailed API reference, including endpoints for validation, parsing, and form management.
- Included performance characteristics and testing strategy for better understanding of system capabilities.
- Enhanced installation and setup instructions for both backend and frontend components.
2025-08-26 01:06:42 +05:30
69047a1bdd refactor: update README files for backend and frontend with enhanced documentation and structure
- Renamed backend README to reflect "Bulk Questionnaire Upload" focus.
- Expanded backend documentation to include detailed architecture, API references, and error handling strategies.
- Updated frontend README to include new features, installation instructions, and API integration details.
- Improved project structure descriptions and added sections for testing, deployment, and future enhancements.
2025-08-26 00:56:05 +05:30