Route '/docs' returns 404 locally due to unconfigured external content source and lack of documentation in README.md
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 43
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
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](https://github.com/gofr-dev/gofr/tree/development/docs) repository are not automatically fetched or documented as prerequisites.
#### Steps to Reproduce the same issues-
1. Clone the website repository: `git clone https://github.com/gofr-dev/website.git`
2. Install dependencies: `npm install`
3. Run the local server: `npm run dev`
4. 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](https://github.com/gofr-dev/website/tree/main/src/app/docs)
**1. Local Entry Points:** The website repository contains the scaffolding for the docs in:
- `src/app/docs/layout.jsx`
- `src/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](https://github.com/gofr-dev/gofr/tree/development/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.js`
- `page.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:
1. Update Documentation: Explicitly list steps in the `README.md` to clone the gofr docs into the website directory.
2. 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.