This monorepo contains the DataOculus applications:
- Apps/Docs (
apps/docs): Docusaurus documentation site - Apps/Site (
apps/site): Main Next.js website
DataOculus/
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── apps/
│ ├── docs/ # Docusaurus documentation (Port 3000)
│ ├── site/ # Next.js main website (Port 3001)
│ └── ...
└── package.json # Root workspace configuration
- Node.js >=18.0.0
- npm >=9.0.0
# Install dependencies for all workspaces
npm installnpm run devThis will start:
- Documentation site on http://localhost:3000
- Main website on http://localhost:3001
Documentation site only:
npm run dev:docsMain website only:
npm run dev:sitenpm run build# Build documentation
npm run build:docs
# Build main website
npm run build:site
# Build for GitHub Pages
npm run build:docs # Docs (always static)
cd apps/site && npm run build:github # Site (static export)# Start documentation site
npm run start:docs
# Start main website
npm run start:siteThe repository includes automated deployment workflows:
- Documentation: Automatically deploys to GitHub Pages on push to
main - Site: Automatically deploys to GitHub Pages with static export
- URL:
https://<username>.github.io/<repository>/
All deployment workflows can be triggered manually from the GitHub Actions tab.
- Go to repository Settings → Pages
- Set Source to "GitHub Actions"
- Workflows will automatically deploy on push to
main
To use a custom domain instead of GitHub Pages default:
- Update
apps/site/next.config.jsto remove base paths - Add CNAME file to
apps/site/public/ - Configure DNS settings
- Enable custom domain in repository settings
| Script | Description |
|---|---|
npm run dev |
Start both apps in development mode |
npm run dev:docs |
Start documentation site only (port 3000) |
npm run dev:site |
Start main website only (port 3001) |
npm run build |
Build all applications |
npm run build:docs |
Build documentation site |
npm run build:site |
Build main website |
npm run start |
Start both apps in production mode |
npm run start:docs |
Start documentation in production mode |
npm run start:site |
Start website in production mode |
npm run lint |
Run linting for all workspaces |
npm run clean |
Clean all build artifacts and node_modules |
npm run install:all |
Install dependencies for all apps |
This monorepo uses npm workspaces. Each application in the apps/ directory is a separate workspace with its own package.json and dependencies.
# Run a command in a specific workspace
npm run <script> --workspace=apps/docs
npm run <script> --workspace=apps/site
# Install a dependency in a specific workspace
npm install <package> --workspace=apps/docs
npm install <package> --workspace=apps/site
# Install a dependency for all workspaces
npm install <package> --workspaces- Documentation: http://localhost:3000
- Main Website: http://localhost:3001
The repository includes comprehensive CI/CD workflows:
- Continuous Integration: Automated testing and linting
- Documentation Deployment: Automatic GitHub Pages deployment
- Site Deployment: Next.js static export to GitHub Pages
- OpenAPI Updates: Daily API specification updates
See .github/README.md for detailed workflow documentation.
- Clone the repository
- Install dependencies:
npm install - Start development:
npm run dev - Make changes in the appropriate app directory
- Test locally:
npm run build - Commit and push: Automatic deployment on push to
main
- Make your changes in the appropriate workspace
- Test locally using the development scripts
- Build to ensure everything works correctly
- Submit your pull request
- Monorepo: Single repository containing multiple related applications
- Workspaces: Each app is an independent workspace with its own dependencies
- Shared Dependencies: Common dependencies are hoisted to the root when possible
- Independent Deployment: Each app can be built and deployed independently
- Centralized CI/CD: All GitHub Actions workflows managed at the repository root
- Local development with hot reloading
- Independent port configuration
- Shared development dependencies
- Optimized builds for each application
- Static export support for GitHub Pages
- Docker deployment support (standalone mode)
- Automatic static export for Next.js
- Proper asset path configuration
- Custom domain support