-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from untitledaiproject/ethan/web
Ethan/web
- Loading branch information
Showing
34 changed files
with
4,078 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# poetry | ||
poetry.lock | ||
.pyproject.toml | ||
__pypackages__/ | ||
|
||
# MyPy | ||
.mypy_cache/ | ||
|
||
# Pytest | ||
.pytest_cache/ | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# PyCharm | ||
.idea/ | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# Others | ||
.DS_Store | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
|
||
# Exclude the Dockerfile and .dockerignore to prevent potential leaks | ||
Dockerfile | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Next.js build output | ||
.next/ | ||
out/ | ||
build/ | ||
|
||
# Node modules | ||
node_modules/ | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids/ | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov/ | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage/ | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output/ | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt/ | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components/ | ||
|
||
# IDEs and editors | ||
.idea/ | ||
*.swp | ||
*.swo | ||
.vscode/ | ||
*.sublime-workspace | ||
*.sublime-project | ||
*.atom/ | ||
*.iml | ||
*.eml | ||
*.esproj | ||
*.tmp | ||
*.tmp_proj | ||
*.tmproj | ||
*.tmproject | ||
*.tproject | ||
nbproject/ | ||
*.komodoproject | ||
.kate-swp/ | ||
*.swp | ||
*.swo | ||
*.swn | ||
*.sml | ||
.session | ||
*.log | ||
|
||
# OS generated files | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# Testing | ||
__tests__/ | ||
__mocks__/ | ||
|
||
# Production | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Misc | ||
*.gz | ||
*.zip | ||
*.rar | ||
*.tar | ||
*.tar.gz | ||
*.tgz | ||
*.bzip | ||
*.bzip2 | ||
*.7z | ||
*.iso | ||
*.dmg | ||
*.img | ||
*.msi | ||
*.msp | ||
*.sms | ||
*.exe | ||
*.dll | ||
*.deb | ||
*.rpm | ||
*.qcow2 | ||
*.vdi | ||
*.vmdk | ||
*.vhd | ||
*.vhdx | ||
*.bak | ||
*.sql | ||
*.psd | ||
*.ai | ||
*.sketch | ||
*.md | ||
README.md | ||
LICENSE | ||
.dockerignore | ||
Dockerfile | ||
*.pem | ||
*.key | ||
*.env | ||
*.cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:18-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM node:18-alpine AS runner | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/next.config.mjs ./ | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/.next ./.next | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder /app/server.js ./server.js | ||
|
||
EXPOSE 3000 | ||
|
||
ENV NODE_ENV production | ||
|
||
# If no url is set we assume that it's local | ||
ENV UNTITLEDAI_API_URL=http://host.docker.internal:8000 | ||
|
||
# Start the app with the custom server if it's local for proxying, otherwise start the normal server | ||
CMD ["/bin/sh", "-c", "if [ \"$UNTITLEDAI_API_URL\" = 'http://host.docker.internal:8000' ]; then npm run startCustom; else npm start; fi"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
## Getting Started | ||
|
||
First, set the client token environmental variable: | ||
|
||
```bash | ||
export UNTITLEDAI_USER_CLIENT_TOKEN=your-client-token | ||
``` | ||
|
||
Optionally, set the google maps token if you want maps to work: | ||
|
||
```bash | ||
export GOOGLE_MAPS_API_KEY=your-google-maps-token | ||
``` | ||
|
||
Then, install the dependencies: | ||
|
||
```bash | ||
yarn install | ||
# or | ||
npm install | ||
# or | ||
pnpm install | ||
# or | ||
bun install | ||
``` | ||
|
||
|
||
Then, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) | ||
|
||
IMPORTANT: Currently the webapp just passes the token for authentication there is no way to log in so do not expose this to the internet! |
Oops, something went wrong.