-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add developer support for using next.js to serve generated static files #814
base: master
Are you sure you want to change the base?
Conversation
…katext.js working with loaded chat history
…erent github actions workflows to run in CI with the new assets
- prod.Dockerfile | ||
- docker-compose.yml | ||
- .github/workflows/dockerize.yml | ||
pull_request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and make PR builds optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very exciting work here towards upgrading our system. Nice work! Left a few changes for making documentation easier to follow and fixing windows usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Interested to see our UX dev velocity increase using a modern front-end frameworks!
|
||
export const metadata: Metadata = { | ||
title: "Khoj AI", | ||
description: "Your, open-source, personal AI assistant", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "Your, open-source, personal AI assistant", | |
description: "Your open, personal AI", |
or to match the description on the other clients (desktop, emacs, obsidian)
description: "Your, open-source, personal AI assistant", | |
description: "An AI copilot for your Second Brain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
protocol: "https", | ||
hostname: "khoj-web-bucket.s3.amazonaws.com", | ||
}, | ||
{ | ||
protocol: "https", | ||
hostname: "khoj-generated-images.s3.amazonaws.com", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two s3 buckets shouldn't be required anymore? Those buckets are deprecated
To improve the developer experience for front-end development, we're migrating to Next.js. In order to do this migration page-by-page, we're using static site generation via Next.js. This also helps us avoid making cross site requests from front-end to back-end for the time being, while giving a ramp to separating out server and client if needed for scale down the road.
Dev instructions for using the
next.js
setup are in the added README.This adds scaffolding for including the built files in the python package as well as the docker images. Docker setup has been tested locally. In order to verify the build is working as expected, we can navigate to the
{khoj_host}:42110/experimental
and verify that the experiment page comes up.This setup works with serving static files included in the
src/interface/web
folder from the Django app. The key bit for understanding the setup is in theyarn export
command inpackage.json
.