-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Description
The local development environment for the website is currently broken "out of the box." When running the website locally, the documentation routes fail to resolve because the content source files which reside in the external gofr-dev/gofr repository are not automatically fetched or documented as prerequisites.
Steps to Reproduce the same issues-
- Clone the website repository:
git clone https://github.com/gofr-dev/website.git - Install dependencies:
npm install - Run the local server:
npm run dev - Navigate to the route:
http://localhost:3000/docs
Actual Behavior
The application throws a 404 Page Not Found error.
Technical Analysis & Root Cause
The issue is coming from missing dependencies required by the src/app/docs directory structure from gofr-dev/gofr/..../docs
1. Local Entry Points: The website repository contains the scaffolding for the docs in:
src/app/docs/layout.jsxsrc/app/docs/page.jsx
2. Missing External Dependencies: These entry points attempt to render content that is expected to exist locally but is actually hosted in the core gofr repository gofr-dev/gofr/.../docs
-
As there is no script to fetch them, the local environment lacks the following critical files/directories required for the router to function:
quick-start/references/navigation.jspage.md
3. Result: Since these files are missing from the local file system and there is no fallback logic or documentation in README.md instructing how to link them, the Next.js router cannot resolve the content, resulting in a 404 error.
Suggested Fix
To fix the developer experience (DX), we should either:
- Update Documentation: Explicitly list steps in the
README.mdto clone the gofr docs into the website directory. - Add Automation: Create a script (e.g., `npm run fetch-docs) that pulls the docs folder from the gofr repository into the local website project during setup.