A playground for orbital visualizations, calculations, and experiments
Try it out !! https://datumgeek.github.io/orbital-eye/e02
- @portal-eye/e01-visualize Sample
- @portal-eye/e02-visualize Sample
Try it out !! https://datumgeek.github.io/orbital-eye/e02
Investigate the Implementation
See the platform: Comcast "Porrtal" Open Source Project
Try it out !! https://datumgeek.github.io/orbital-eye/
Investigate the Implementation
Try it out in Porrtal Open-Source IDE-Like UX https://datumgeek.github.io/orbital-eye/portal/
Investigate the Implementation
npx create-nx-workspace
npm install -g nx
cd orbital-eye
nx dev orbital-eye
git remote add origin https://github.com/datumgeek/orbital-eye.git
Investigate the Implementation
Investigate the Implementation
Publishing the orbital-eye Next.js app from an NX monorepo to GitHub Pages involves additional considerations because Next.js apps are dynamic by nature, but they can be exported as static websites using the next export
command. Below is step-by-step guide:
- Ensure your app is fully static (no server-side processing or services).
- You have a GitHub repository set up for your project.
Install the gh-pages
package to simplify deployment to GitHub Pages:
npm install --save-dev gh-pages
- Open the
next.config.js
file in your Next.js app directory (apps/orbital-eye
). - Add the
trailingSlash
,basePath
,assetPrefix
andoutput
properties to the configuration. - After you publish, comment out the
basePath
,assetPrefix
andoutput
properties fornx dev orbital-eye
local development
//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next');
/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
},
trailingSlash: true,
// uncomment these for gh-pages deployment
basePath: '/orbital-eye',
assetPrefix: '/orbital-eye',
output: 'export'
};
const plugins = [
// Add more Next.js plugins to this list if needed.
withNx,
];
module.exports = composePlugins(...plugins)(nextConfig);
This ensures the app can be statically exported and hosted under the /orbital-eye
route of your GitHub Pages site.
Add a deploy
script to the root package.json
:
"scripts": {
"deploy": "nx build orbital-eye --skip-nx-cache && gh-pages -d apps/orbital-eye/out"
}
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "fresh and empty gh-pages branch"
git push origin gh-pages
git checkout main
- Go to your GitHub repository.
- Navigate to Settings > Pages.
- Under Source, select
gh-pages
branch. - Save the changes.
Run the deploy script:
npm run deploy
This pushes the exported static files to the gh-pages
branch in your GitHub repository.
- Go to
https://datumgeek.github.io/orbital-eye/
to view your deployed site. - Check that all routes and assets load correctly.
Automate this process using GitHub Actions:
- Create a new workflow file at
.github/workflows/deploy.yml
. - Use a workflow that builds, exports, and deploys your Next.js app to GitHub Pages.
✨ This workspace has been generated by Nx, Smart Monorepos · Fast CI. ✨
Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.
Run npx nx dev orbital-eye
to start the development server. Happy coding!
Run npx nx build orbital-eye
to build the application. The build artifacts are stored in the output directory (e.g. dist/
or build/
), ready to be deployed.
To execute tasks with Nx use the following syntax:
npx nx <target> <project> <...options>
You can also run multiple targets:
npx nx run-many -t <target1> <target2>
..or add -p
to filter specific projects
npx nx run-many -t <target1> <target2> -p <proj1> <proj2>
Targets can be defined in the package.json
or projects.json
. Learn more in the docs.
Nx comes with local caching already built-in (check your nx.json
). On CI you might want to go a step further.
Run npx nx graph
to show the graph of the workspace.
It will show tasks that you can run with Nx.