├── .github └── workflows │ └── pages.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── LICENSE ├── README.md ├── TODO.md ├── app ├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── README.md ├── android │ ├── .gitignore │ ├── .idea │ │ ├── .gitignore │ │ ├── compiler.xml │ │ ├── deploymentTargetDropDown.xml │ │ ├── migrations.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── capacitor.build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── getcapacitor │ │ │ │ └── myapp │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── ai │ │ │ │ │ └── adeus │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable-land-hdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-mdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xxxhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-hdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-mdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxxhdpi │ │ │ │ └── splash.png │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ └── splash.png │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ │ └── xml │ │ │ │ └── file_paths.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── getcapacitor │ │ │ └── myapp │ │ │ └── ExampleUnitTest.java │ ├── build.gradle │ ├── capacitor.settings.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── variables.gradle ├── capacitor.config.ts ├── components.json ├── ios │ ├── .gitignore │ └── App │ │ ├── App.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── App.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── App │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── Splash.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── splash-2732x2732-1.png │ │ │ │ ├── splash-2732x2732-2.png │ │ │ │ └── splash-2732x2732.png │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ └── Info.plist │ │ ├── Podfile │ │ └── Podfile.lock ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ ├── favicon.ico │ ├── next.svg │ └── vercel.svg ├── src │ ├── components │ │ ├── Chat.tsx │ │ ├── ChatDots.tsx │ │ ├── ChatLog.tsx │ │ ├── ConversationHistory.tsx │ │ ├── LoginForm.tsx │ │ ├── LogoutButton.tsx │ │ ├── NavMenu.tsx │ │ ├── NewConversationButton.tsx │ │ ├── PromptForm.tsx │ │ ├── Prose.tsx │ │ ├── SideMenu.tsx │ │ ├── ThemeProvider.tsx │ │ ├── ThemeToggle.tsx │ │ └── ui │ │ │ ├── button.tsx │ │ │ ├── drawer.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ ├── popover.tsx │ │ │ ├── skeleton.tsx │ │ │ ├── sonner.tsx │ │ │ └── textarea.tsx │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ └── index.tsx │ ├── styles │ │ └── globals.css │ └── utils │ │ ├── cnHelper.ts │ │ ├── range.ts │ │ └── useSupabaseConfig.tsx ├── tailwind.config.ts └── tsconfig.json ├── devices ├── coralai │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ ├── checkOutput.py │ └── main.cc ├── esp32-c3 │ ├── CMakeLists.txt │ ├── README.md │ ├── dependencies.lock │ ├── main │ │ ├── BLE │ │ │ ├── Server.cpp │ │ │ └── Server.h │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── recorder │ │ │ ├── I2SRecorder.cpp │ │ │ └── I2SRecorder.h │ ├── sdkconfig │ ├── sdkconfig.ci │ ├── sdkconfig.defaults │ └── sdkconfig.old ├── raspipico │ ├── CMakeLists.txt │ └── main.c └── raspizerow │ ├── CMakeLists.txt │ ├── compile.sh │ ├── install.sh │ └── main.cpp ├── docs ├── CNAME ├── Gemfile ├── Gemfile.lock ├── _config.yml ├── archive │ ├── archive.md │ ├── launch_readme.md │ └── setup_coralai.md ├── getting_started.md ├── guides │ ├── assemble_hardware.md │ ├── esp32-c3.md │ ├── guides.md │ ├── make_db_migration.md │ ├── ollama_ngrok_setup.md │ ├── sequence.md │ ├── setup_raspberry_pi_zero.md │ └── use_python_recorder.md ├── images │ ├── Screenshot 2024-03-04 at 16.19.36.png │ ├── adeus_01.jpeg │ ├── adeus_diagram.png │ ├── bluetooth-screen.PNG │ ├── enableSSH.png │ ├── enableSettings.png │ ├── esp32-c3-bat.png │ ├── esp32-c3-mic.png │ ├── imagerMenu.png │ ├── login_screenshot.png │ ├── mermaid.png │ ├── openrouter.png │ ├── osSelect.png │ ├── supabase_auth.png │ ├── supabase_creds.png │ ├── supabase_new_prpject.png │ ├── supabase_new_user.png │ ├── supabase_sql_editor.png │ ├── supabase_tables.png │ ├── thumbnail_1.png │ ├── thumbnail_2.png │ └── transcript-example.png ├── index.md └── troubleshoot.md ├── prettier.config.cjs ├── scripts ├── managed │ ├── new_accnt.py │ └── requirements.txt └── python_recorder_client │ ├── .gitignore │ ├── main.py │ └── requirements.txt └── supabase ├── .gitignore ├── config.toml ├── functions ├── chat │ └── index.ts ├── common │ ├── cors.ts │ ├── errors.ts │ └── supabaseClient.ts └── process-audio │ └── index.ts ├── migrations ├── 20240214211830_remote_schema.sql ├── 20240225224922_remote_schema.sql └── 20240326142114_remote_schema.sql └── seed.sql /.github/workflows/pages.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # Sample workflow for building and deploying a Jekyll site to GitHub Pages 7 | name: Deploy Jekyll site to Pages 8 | 9 | on: 10 | push: 11 | branches: 12 | - "main" 13 | paths: 14 | - "docs/**" 15 | 16 | # Allows you to run this workflow manually from the Actions tab 17 | 18 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 19 | permissions: 20 | contents: read 21 | pages: write 22 | id-token: write 23 | 24 | # Allow one concurrent deployment 25 | concurrency: 26 | group: "pages" 27 | cancel-in-progress: true 28 | 29 | jobs: 30 | # Build job 31 | build: 32 | runs-on: ubuntu-latest 33 | steps: 34 | - name: Checkout 35 | uses: actions/checkout@v3 36 | - name: Setup Ruby 37 | uses: ruby/setup-ruby@v1 38 | with: 39 | ruby-version: "3.1" # Not needed with a .ruby-version file 40 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 41 | cache-version: 0 # Increment this number if you need to re-download cached gems 42 | working-directory: "${{ github.workspace }}/docs" 43 | - name: Setup Pages 44 | id: pages 45 | uses: actions/configure-pages@v3 46 | - name: Build with Jekyll 47 | # Outputs to the './_site' directory by default 48 | working-directory: ./docs 49 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" 50 | env: 51 | JEKYLL_ENV: production 52 | - name: Upload artifact 53 | # Automatically uploads an artifact from the './_site' directory by default 54 | uses: actions/upload-pages-artifact@v1 55 | with: 56 | path: "docs/_site/" 57 | 58 | # Deployment job 59 | deploy: 60 | environment: 61 | name: github-pages 62 | url: ${{ steps.deployment.outputs.page_url }} 63 | runs-on: ubuntu-latest 64 | needs: build 65 | steps: 66 | - name: Deploy to GitHub Pages 67 | id: deployment 68 | uses: actions/deploy-pages@v2 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | /cypress/videos 11 | cypress.env.json 12 | 13 | # next.js 14 | /.next/ 15 | /out/ 16 | 17 | tsconfig.tsbuildinfo 18 | 19 | # production 20 | /build 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | *.pepk 26 | AuthKey_*.p8 27 | 28 | # debug 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | .pnpm-debug.log* 33 | ui-debug.log* 34 | 35 | # local env files 36 | .sqlite3 37 | .venv* 38 | .env 39 | out 40 | .env.local 41 | .env*.local 42 | .vscode 43 | package-lock.json* 44 | 45 | # vercel 46 | .vercel 47 | 48 | # apple deployment config 49 | ios/App/fastlane/Appfile 50 | 51 | 52 | # pycache: 53 | __pycache__/ 54 | 55 | # Not sure what a .gitignore is? 56 | # See: https://git-scm.com/docs/gitignore 57 | 58 | # These are directly copied from Jekyll's first-party docs on `.gitignore` files: 59 | # https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control 60 | 61 | # Ignore the default location of the built site, and caches and metadata generated by Jekyll 62 | _site/ 63 | .sass-cache/ 64 | .jekyll-cache/ 65 | .jekyll-metadata 66 | 67 | # Ignore folders generated by Bundler 68 | .bundle/ 69 | vendor/ 70 | 71 | venv/ 72 | 73 | **/build -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "devices/coralai/coralmicro"] 2 | path = devices/coralai/coralmicro 3 | url = https://github.com/google-coral/coralmicro 4 | [submodule "devices/esp32-c3/components/arduino"] 5 | path = devices/esp32-c3/components/arduino 6 | url = https://github.com/espressif/arduino-esp32.git 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .pnp 3 | .pnp.js 4 | coverage 5 | 6 | .changeset 7 | .github 8 | 9 | .next/ 10 | **/next-env.d.ts 11 | out/ 12 | build 13 | 14 | .DS_Store 15 | *.pem 16 | 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | .pnpm-debug.log* 21 | 22 | .turbo 23 | 24 | dist 25 | .solid 26 | docs/ 27 | *.yaml 28 | *.yml 29 | *.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | ℹ️ 🔴 Active development of Open Source AI Wearable can be found @ [Friend Repo](https://github.com/BasedHardware/Friend), and [Discord Community](https://discord.gg/kEXXsnb5b3) 4 | 5 | # **Adeus** 6 | 7 | Open-Source AI Wearable Device, the future depends on it! 8 | 9 | ![ADeus v0.1](docs/images/adeus_01.jpeg) 10 | 11 |

12 | 13 | [Homepage](https://www.adeus.ai/) | [Documentation](https://docs.adeus.ai/) | [Discord](https://discord.gg/kEXXsnb5b3) 14 | 15 |

16 | 17 | [![GitHub Repo stars](https://img.shields.io/github/stars/adamcohenhillel/ADeus)](https://github.com/adamcohenhillel/ADeus) 18 | 19 | Adeus is a wearable device that captures what you say and hear in the real world and then transcribes and stores it on your own server. You can then chat with Adeus using the app, and it will have all the right context about what you want or need to talk about - **a truly personalized, personal AI.** 20 | 21 |
22 | 23 | ## Table of contents 24 | 25 | - [Why Adeus?](#why-adeus) 26 | - [How Adeus is built](#how-adeus-is-built) 27 | - [Documentation](#documentation) 28 | - [Getting Started](https://docs.adeus.ai/getting_started.html) 29 | - [How to Contribute](https://docs.adeus.ai/#how-to-contribute) 30 | 31 | ## Why Adeus? 32 | 33 | In the upcoming world, Personal AI will become an integrated part of our daily lives, they will be with us all the time, and will know much about us as our closest friends - and therefore, with Adeus, we are making sure it is completely open-source, and that you can **own** your own data. 34 | 35 | ## How Adeus is built 36 | 37 | Adeus consists of 3 parts: 38 | 39 | 1. **A mobile / web app:** 40 | An interface that allows the user to interact with their Personal AI and data through chat. 41 | 42 | 2. **Hardware device:** The wearable device that will record everything the user say or hear, and send it to the backend to be processed. 43 | 44 | 3. **Supabase :** The backend and database, where we will process and store data, and interact with LLMs. 45 | 46 | ![ADeus diagram](docs/images/adeus_diagram.png) 47 | 48 | ## Documentation: 49 | 50 | - [Getting Started Guide](https://docs.adeus.ai/getting_started.html#1-backend-supabase) 51 | - [How to Contribute?](https://docs.adeus.ai/#how-to-contribute) 52 | 53 | 54 | 55 | #### Made by the Community, with -❤️-: 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - [ ] An easy setup script / deploy my own Ollama server to replace OpenAI [ticket #6](https://github.com/adamcohenhillel/AdDeus/issues/6) 2 | - [ ] Add How-to for Ollama setup ([ticket #9](https://github.com/adamcohenhillel/AdDeus/issues/9)) 3 | 4 | ### Known Bugs: 5 | 6 | - [ ] Whisper tends to generate YouTube-like text when the audio is unclear, so you can get noise data in the database like "Thank you for watching", and "See you in the next video," even though it has nothing to do with the audio ([ticket #7](https://github.com/adamcohenhillel/AdDeus/issues/7)) 7 | 8 | - [ ] Currently it is using Wi-Fi, which makes it not-so mobile. An alternative approach would either be: ([ticket #8](https://github.com/adamcohenhillel/AdDeus/issues/8)) 9 | 10 | - Bluetooth, pairing with the mobile device 11 | - Sdd a 4G card that will allow it to be completly independent 12 | 13 | - [ ] Sometimes when loading from scratch, it takes some time (2-3 curl requests) until it resolves the DNS of the Supabase instance ([ticket #8](https://github.com/adamcohenhillel/AdDeus/issues/12)) 14 | 15 | #### Backend: 16 | 17 | - The RAG (Retrieval-Augmented Generation) can be extremely improved: 18 | - [ ] Need to process the audio not only into "embeddings" but also run an LLM on it to generate some context ([ticket #1](https://github.com/adamcohenhillel/AdDeus/issues/1)) 19 | - [ ] Need to query the RAG more efficiently, maybe with timestamp as well, etc. - not only embeddings (relates to the processing part) ([ticket #2](https://github.com/adamcohenhillel/AdDeus/issues/2)) 20 | - [ ] Improve security - currently I didn't spent too much time making the Supabase RLS really work (for writing data) ([ticket #3](https://github.com/adamcohenhillel/AdDeus/issues/3)) 21 | 22 | #### Hardware / On-device: 23 | 24 | - [ ] Run on a Rasberry Pi Pico / Zero, as it is much much cheaper, and should do the work too ([ticket #4](https://github.com/adamcohenhillel/AdDeus/issues/4)) 25 | - [ ] Currently the setup is without battery, need to find the easiest way to add this as part of the setup ([ticket #5](https://github.com/adamcohenhillel/AdDeus/issues/5)) 26 | 27 | #### UX and Onboarding 28 | -------------------------------------------------------------------------------- /app/.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | .cache 3 | public 4 | node_modules 5 | *.esm.js -------------------------------------------------------------------------------- /app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/eslintrc", 3 | "root": true, 4 | "extends": [ 5 | "next/core-web-vitals", 6 | "prettier", 7 | "plugin:tailwindcss/recommended" 8 | ], 9 | "plugins": ["tailwindcss"], 10 | "rules": { 11 | "@next/next/no-html-link-for-pages": "off", 12 | "react/jsx-key": "off", 13 | "tailwindcss/no-custom-classname": "off" 14 | }, 15 | "settings": { 16 | "tailwindcss": { 17 | "callees": ["cn"], 18 | "config": "tailwind.config.js" 19 | }, 20 | "next": { 21 | "rootDir": ["./"] 22 | } 23 | }, 24 | "overrides": [ 25 | { 26 | "files": ["*.ts", "*.tsx"], 27 | "parser": "@typescript-eslint/parser" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 20 | 21 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 22 | 23 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 24 | 25 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 26 | 27 | ## Learn More 28 | 29 | To learn more about Next.js, take a look at the following resources: 30 | 31 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 32 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 33 | 34 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 35 | 36 | ## Deploy on Vercel 37 | 38 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 39 | 40 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 41 | -------------------------------------------------------------------------------- /app/android/.gitignore: -------------------------------------------------------------------------------- 1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore 2 | 3 | # Built application files 4 | *.apk 5 | *.aar 6 | *.ap_ 7 | *.aab 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | # Uncomment the following line in case you need and you don't have the release build type files in your app 20 | # release/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | 38 | # Android Studio captures folder 39 | captures/ 40 | 41 | # IntelliJ 42 | *.iml 43 | .idea/workspace.xml 44 | .idea/tasks.xml 45 | .idea/gradle.xml 46 | .idea/assetWizardSettings.xml 47 | .idea/dictionaries 48 | .idea/libraries 49 | # Android Studio 3 in .gitignore file. 50 | .idea/caches 51 | .idea/modules.xml 52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 53 | .idea/navEditor.xml 54 | 55 | # Keystore files 56 | # Uncomment the following lines if you do not want to check your keystore files in. 57 | #*.jks 58 | #*.keystore 59 | 60 | # External native build folder generated in Android Studio 2.2 and later 61 | .externalNativeBuild 62 | .cxx/ 63 | 64 | # Google Services (e.g. APIs or Firebase) 65 | # google-services.json 66 | 67 | # Freeline 68 | freeline.py 69 | freeline/ 70 | freeline_project_description.json 71 | 72 | # fastlane 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | fastlane/readme.md 78 | 79 | # Version control 80 | vcs.xml 81 | 82 | # lint 83 | lint/intermediates/ 84 | lint/generated/ 85 | lint/outputs/ 86 | lint/tmp/ 87 | # lint/reports/ 88 | 89 | # Android Profiling 90 | *.hprof 91 | 92 | # Cordova plugins for Capacitor 93 | capacitor-cordova-android-plugins 94 | 95 | # Copied web assets 96 | app/src/main/assets/public 97 | 98 | # Generated Config files 99 | app/src/main/assets/capacitor.config.json 100 | app/src/main/assets/capacitor.plugins.json 101 | app/src/main/res/xml/config.xml 102 | -------------------------------------------------------------------------------- /app/android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /app/android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/android/.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/android/.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/* 2 | !/build/.npmkeep 3 | -------------------------------------------------------------------------------- /app/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | namespace "ai.adeus" 5 | compileSdkVersion rootProject.ext.compileSdkVersion 6 | defaultConfig { 7 | applicationId "ai.adeus" 8 | minSdkVersion rootProject.ext.minSdkVersion 9 | targetSdkVersion rootProject.ext.targetSdkVersion 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | aaptOptions { 14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. 15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' 17 | } 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | repositories { 28 | flatDir{ 29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation fileTree(include: ['*.jar'], dir: 'libs') 35 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" 36 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" 37 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" 38 | implementation project(':capacitor-android') 39 | testImplementation "junit:junit:$junitVersion" 40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" 41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" 42 | implementation project(':capacitor-cordova-android-plugins') 43 | } 44 | 45 | apply from: 'capacitor.build.gradle' 46 | 47 | try { 48 | def servicesJSON = file('google-services.json') 49 | if (servicesJSON.text) { 50 | apply plugin: 'com.google.gms.google-services' 51 | } 52 | } catch(Exception e) { 53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") 54 | } 55 | -------------------------------------------------------------------------------- /app/android/app/capacitor.build.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | 3 | android { 4 | compileOptions { 5 | sourceCompatibility JavaVersion.VERSION_17 6 | targetCompatibility JavaVersion.VERSION_17 7 | } 8 | } 9 | 10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" 11 | dependencies { 12 | implementation project(':capacitor-preferences') 13 | 14 | } 15 | 16 | 17 | if (hasProperty('postBuildExtras')) { 18 | postBuildExtras() 19 | } 20 | -------------------------------------------------------------------------------- /app/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import android.content.Context; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | import androidx.test.platform.app.InstrumentationRegistry; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * @see Testing documentation 15 | */ 16 | @RunWith(AndroidJUnit4.class) 17 | public class ExampleInstrumentedTest { 18 | 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 23 | 24 | assertEquals("com.getcapacitor.app", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/android/app/src/main/java/ai/adeus/MainActivity.java: -------------------------------------------------------------------------------- 1 | package ai.adeus; 2 | 3 | import com.getcapacitor.BridgeActivity; 4 | 5 | public class MainActivity extends BridgeActivity {} 6 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-land-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-land-hdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-land-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-land-mdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-land-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-land-xhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-land-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-land-xxhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-land-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-land-xxxhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-port-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-port-hdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-port-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-port-mdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-port-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-port-xhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-port-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-port-xxhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-port-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable-port-xxxhdpi/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | adeus 4 | adeus 5 | ai.adeus 6 | ai.adeus 7 | 8 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /app/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | 14 | @Test 15 | public void addition_isCorrect() throws Exception { 16 | assertEquals(4, 2 + 2); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:8.0.0' 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | apply from: "variables.gradle" 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /app/android/capacitor.settings.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | include ':capacitor-android' 3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') 4 | 5 | include ':capacitor-preferences' 6 | project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android') 7 | -------------------------------------------------------------------------------- /app/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # AndroidX package structure to make it clearer which packages are bundled with the 20 | # Android operating system, and which are packaged with your app's APK 21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 22 | android.useAndroidX=true 23 | -------------------------------------------------------------------------------- /app/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /app/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /app/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':capacitor-cordova-android-plugins' 3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') 4 | 5 | apply from: 'capacitor.settings.gradle' -------------------------------------------------------------------------------- /app/android/variables.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | minSdkVersion = 22 3 | compileSdkVersion = 33 4 | targetSdkVersion = 33 5 | androidxActivityVersion = '1.7.0' 6 | androidxAppCompatVersion = '1.6.1' 7 | androidxCoordinatorLayoutVersion = '1.2.0' 8 | androidxCoreVersion = '1.10.0' 9 | androidxFragmentVersion = '1.5.6' 10 | coreSplashScreenVersion = '1.0.0' 11 | androidxWebkitVersion = '1.6.1' 12 | junitVersion = '4.13.2' 13 | androidxJunitVersion = '1.1.5' 14 | androidxEspressoCoreVersion = '3.5.1' 15 | cordovaAndroidVersion = '10.1.1' 16 | } -------------------------------------------------------------------------------- /app/capacitor.config.ts: -------------------------------------------------------------------------------- 1 | import { CapacitorConfig } from '@capacitor/cli'; 2 | 3 | const config: CapacitorConfig = { 4 | appId: 'ai.adeus', 5 | appName: 'adeus', 6 | webDir: 'out', 7 | server: { 8 | androidScheme: 'https', 9 | }, 10 | }; 11 | 12 | export default config; 13 | -------------------------------------------------------------------------------- /app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/utils/cnHelper" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/ios/.gitignore: -------------------------------------------------------------------------------- 1 | App/build 2 | App/Pods 3 | App/output 4 | App/App/public 5 | DerivedData 6 | xcuserdata 7 | 8 | # Cordova plugins for Capacitor 9 | capacitor-cordova-ios-plugins 10 | 11 | # Generated Config files 12 | App/App/capacitor.config.json 13 | App/App/config.xml 14 | -------------------------------------------------------------------------------- /app/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/ios/App/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/ios/App/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Capacitor 3 | 4 | @UIApplicationMain 5 | class AppDelegate: UIResponder, UIApplicationDelegate { 6 | 7 | var window: UIWindow? 8 | 9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 10 | // Override point for customization after application launch. 11 | return true 12 | } 13 | 14 | func applicationWillResignActive(_ application: UIApplication) { 15 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 16 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 17 | } 18 | 19 | func applicationDidEnterBackground(_ application: UIApplication) { 20 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 21 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 22 | } 23 | 24 | func applicationWillEnterForeground(_ application: UIApplication) { 25 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 26 | } 27 | 28 | func applicationDidBecomeActive(_ application: UIApplication) { 29 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 30 | } 31 | 32 | func applicationWillTerminate(_ application: UIApplication) { 33 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 34 | } 35 | 36 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { 37 | // Called when the app was launched with a url. Feel free to add additional processing here, 38 | // but if you want the App API to support tracking app url opens, make sure to keep this call 39 | return ApplicationDelegateProxy.shared.application(app, open: url, options: options) 40 | } 41 | 42 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { 43 | // Called when the app was launched with an activity, including Universal Links. 44 | // Feel free to add additional processing here, but if you want the App API to support 45 | // tracking app url opens, make sure to keep this call 46 | return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "filename": "AppIcon-512@2x.png", 5 | "idiom": "universal", 6 | "platform": "ios", 7 | "size": "1024x1024" 8 | } 9 | ], 10 | "info": { 11 | "author": "xcode", 12 | "version": 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "splash-2732x2732-2.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "filename": "splash-2732x2732-1.png", 11 | "scale": "2x" 12 | }, 13 | { 14 | "idiom": "universal", 15 | "filename": "splash-2732x2732.png", 16 | "scale": "3x" 17 | } 18 | ], 19 | "info": { 20 | "version": 1, 21 | "author": "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png -------------------------------------------------------------------------------- /app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png -------------------------------------------------------------------------------- /app/ios/App/App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/ios/App/App/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/ios/App/App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | adeus 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /app/ios/App/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' 2 | 3 | platform :ios, '13.0' 4 | use_frameworks! 5 | 6 | # workaround to avoid Xcode caching of Pods that requires 7 | # Product -> Clean Build Folder after new Cordova plugins installed 8 | # Requires CocoaPods 1.6 or newer 9 | install! 'cocoapods', :disable_input_output_paths => true 10 | 11 | def capacitor_pods 12 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' 13 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' 14 | pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences' 15 | end 16 | 17 | target 'App' do 18 | capacitor_pods 19 | # Add your Pods here 20 | end 21 | 22 | post_install do |installer| 23 | assertDeploymentTarget(installer) 24 | end 25 | -------------------------------------------------------------------------------- /app/ios/App/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Capacitor (5.6.0): 3 | - CapacitorCordova 4 | - CapacitorCordova (5.6.0) 5 | - CapacitorPreferences (5.0.7): 6 | - Capacitor 7 | 8 | DEPENDENCIES: 9 | - "Capacitor (from `../../node_modules/@capacitor/ios`)" 10 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" 11 | - "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)" 12 | 13 | EXTERNAL SOURCES: 14 | Capacitor: 15 | :path: "../../node_modules/@capacitor/ios" 16 | CapacitorCordova: 17 | :path: "../../node_modules/@capacitor/ios" 18 | CapacitorPreferences: 19 | :path: "../../node_modules/@capacitor/preferences" 20 | 21 | SPEC CHECKSUMS: 22 | Capacitor: ebfc16cdb8116d04c101686b080342872da42d43 23 | CapacitorCordova: 931b48fcdbc9bc985fc2f16cec9f77c794a27729 24 | CapacitorPreferences: 77ac427e98db83bace772455f8ba447430382c4c 25 | 26 | PODFILE CHECKSUM: 769e120bf4dfe4ef1095b83775e36bafeeeb3cdd 27 | 28 | COCOAPODS: 1.15.2 29 | -------------------------------------------------------------------------------- /app/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: false, 4 | output: 'export', 5 | images: { 6 | unoptimized: true, 7 | }, 8 | }; 9 | 10 | export default nextConfig; 11 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint", 10 | "lint:fix": "next lint --fix", 11 | "format:check": "prettier --check .", 12 | "format": "prettier --write . --list-different", 13 | "check": "npm run lint && npm run format:check", 14 | "fix": "npm run lint:fix && npm run format", 15 | "app": "npm run build && npx cap sync", 16 | "ios": "npm run app && npx cap open ios", 17 | "android": "npm run app && npx cap open android" 18 | }, 19 | "dependencies": { 20 | "@capacitor/android": "^5.6.0", 21 | "@capacitor/core": "^5.6.0", 22 | "@capacitor/ios": "^5.6.0", 23 | "@capacitor/preferences": "^5.0.7", 24 | "@radix-ui/react-dialog": "^1.0.5", 25 | "@radix-ui/react-label": "^2.0.2", 26 | "@radix-ui/react-popover": "^1.0.7", 27 | "@radix-ui/react-slot": "^1.0.2", 28 | "@supabase/auth-helpers-nextjs": "^0.8.7", 29 | "@supabase/auth-helpers-react": "^0.4.2", 30 | "@supabase/supabase-js": "^2.39.3", 31 | "@tanstack/react-query": "^5.18.1", 32 | "@types/katex": "^0.16.7", 33 | "class-variance-authority": "^0.7.0", 34 | "clsx": "^2.1.0", 35 | "framer-motion": "^11.0.3", 36 | "highlight.js": "^11.9.0", 37 | "katex": "^0.16.9", 38 | "lucide-react": "^0.321.0", 39 | "markdown-it": "^14.0.0", 40 | "next": "14.1.0", 41 | "next-themes": "^0.2.1", 42 | "react": "^18", 43 | "react-dom": "^18", 44 | "sonner": "^1.4.0", 45 | "tailwind-merge": "^2.2.1", 46 | "tailwindcss-animate": "^1.0.7", 47 | "vaul": "^0.9.0" 48 | }, 49 | "devDependencies": { 50 | "@capacitor/cli": "^5.6.0", 51 | "@tailwindcss/typography": "^0.5.10", 52 | "@types/markdown-it": "^13.0.7", 53 | "@types/node": "^20", 54 | "@types/react": "^18", 55 | "@types/react-dom": "^18", 56 | "autoprefixer": "^10.0.1", 57 | "eslint": "^8", 58 | "eslint-config-next": "14.1.0", 59 | "eslint-config-prettier": "^9.1.0", 60 | "eslint-plugin-react": "^7.33.2", 61 | "eslint-plugin-tailwindcss": "^3.14.2", 62 | "postcss": "^8", 63 | "prettier": "^3.2.5", 64 | "prettier-plugin-organize-imports": "^3.2.4", 65 | "tailwindcss": "^3.3.0", 66 | "typescript": "^5" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamcohenhillel/ADeus/4cac1b20f0fddeb92e5eb81d8e57652578f7fad0/app/public/favicon.ico -------------------------------------------------------------------------------- /app/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/components/ChatDots.tsx: -------------------------------------------------------------------------------- 1 | export default function ChatDots({ size }: { size?: string }) { 2 | return ( 3 |
4 |
7 |
10 |
13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/components/ChatLog.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/utils/cnHelper'; 2 | import { AnimatePresence, motion } from 'framer-motion'; 3 | import hljs from 'highlight.js'; 4 | import 'highlight.js/styles/atom-one-dark.css'; 5 | import renderMathInElement from 'katex/contrib/auto-render'; 6 | import 'katex/dist/katex.min.css'; 7 | import MarkdownIt from 'markdown-it'; 8 | import ChatDots from './ChatDots'; 9 | import Prose from './Prose'; 10 | 11 | export interface Message { 12 | role: string; 13 | content: string; 14 | } 15 | 16 | const md = new MarkdownIt({ 17 | highlight: function (str, lang, attrs) { 18 | if (lang && hljs.getLanguage(lang)) { 19 | try { 20 | const highlightedCode = hljs.highlight(str, { 21 | language: lang, 22 | ignoreIllegals: true, 23 | }).value; 24 | const modifiedCode = highlightedCode.replace( 25 | //g, 26 | '' 27 | ); 28 | return modifiedCode; 29 | } catch (__) {} 30 | } 31 | return ''; 32 | }, 33 | html: true, 34 | xhtmlOut: true, 35 | typographer: true, 36 | }); 37 | 38 | if (typeof document !== 'undefined') { 39 | const customCss = document.createElement('style'); 40 | customCss.innerHTML = ` 41 | .hljs-strong-custom { 42 | color: white; 43 | font-weight: normal; 44 | } 45 | `; 46 | document.head.appendChild(customCss); 47 | } 48 | 49 | export default function ChatLog({ 50 | messages, 51 | waitingForResponse, 52 | }: { 53 | messages: Message[]; 54 | waitingForResponse: boolean; 55 | }) { 56 | const renderMessageContent = (content: string) => { 57 | const html = md.render(content); 58 | return ( 59 |
61 | el && 62 | renderMathInElement(el, { 63 | delimiters: [ 64 | {left: "$$", right: "$$", display: true}, 65 | {left: "$", right: "$", display: false}, 66 | {left: "\\(", right: "\\)", display: false}, 67 | {left: "\\begin{equation}", right: "\\end{equation}", display: true}, 68 | {left: "\\begin{align}", right: "\\end{align}", display: true}, 69 | {left: "\\begin{alignat}", right: "\\end{alignat}", display: true}, 70 | {left: "\\begin{gather}", right: "\\end{gather}", display: true}, 71 | {left: "\\begin{CD}", right: "\\end{CD}", display: true}, 72 | {left: "\\[", right: "\\]", display: true} 73 | ], 74 | }) 75 | } 76 | dangerouslySetInnerHTML={{ __html: html }} 77 | /> 78 | ); 79 | }; 80 | 81 | return ( 82 | 83 | {messages ? ( 84 |
    85 | {messages.map((chat, index) => ( 86 |
    94 | 105 | {renderMessageContent(chat['content'])} 106 | 107 |
    108 | ))} 109 | {waitingForResponse ? ( 110 | 116 | 117 | 118 | ) : null} 119 |
120 | ) : null} 121 |
122 | ); 123 | } 124 | -------------------------------------------------------------------------------- /app/src/components/ConversationHistory.tsx: -------------------------------------------------------------------------------- 1 | import { range } from '@/utils/range'; 2 | import { SupabaseClient } from '@supabase/supabase-js'; 3 | import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; 4 | import { AnimatePresence, motion } from 'framer-motion'; 5 | import { ArrowRight, Trash } from 'lucide-react'; 6 | import { toast } from 'sonner'; 7 | import { DrawerClose } from './ui/drawer'; 8 | import { Skeleton } from './ui/skeleton'; 9 | 10 | export interface Conversation { 11 | id: number; 12 | created_at: string; 13 | } 14 | 15 | export default function ConversationHistory({ 16 | supabaseClient, 17 | setConversationId, 18 | }: { 19 | supabaseClient: SupabaseClient; 20 | setConversationId: (id: number) => void; 21 | }) { 22 | const queryClient = useQueryClient(); 23 | 24 | const deleteConversation = useMutation({ 25 | mutationFn: async (conversationId: number) => { 26 | const allConversations = queryClient.getQueryData([ 27 | 'conversations', 28 | ]); 29 | const conversationFound = allConversations?.some( 30 | (conversation) => conversation.id === conversationId 31 | ); 32 | 33 | if (!conversationFound) { 34 | throw new Error('Not found'); 35 | } 36 | 37 | const { error } = await supabaseClient 38 | .from('conversations') 39 | .delete() 40 | .eq('id', conversationId); 41 | if (error) { 42 | throw error; 43 | } 44 | }, 45 | onSuccess: () => { 46 | toast.success('Conversation deleted'); 47 | }, 48 | onError: (error) => { 49 | toast.error(`Error deleting conversation: ${error.message}`); 50 | }, 51 | onSettled: async () => { 52 | queryClient.invalidateQueries({ 53 | queryKey: ['conversations'], 54 | }); 55 | }, 56 | }); 57 | 58 | const getAllConversations = useQuery({ 59 | queryKey: ['conversations'], 60 | queryFn: async () => { 61 | const { data, error } = await supabaseClient 62 | .from('conversations') 63 | .select('id, created_at') 64 | .order('created_at', { ascending: false }); 65 | if (error) { 66 | throw error; 67 | } 68 | return data; 69 | }, 70 | }); 71 | 72 | const formatDate = (dateString: string) => { 73 | const date = new Date(dateString); 74 | return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`; 75 | }; 76 | 77 | return ( 78 | 79 |
80 | {getAllConversations.data && getAllConversations.data.length > 0 81 | ? getAllConversations.data.map((conversation) => ( 82 | 89 |
90 |
ID: {conversation.id}
91 |
92 | Created: {formatDate(conversation.created_at)} 93 |
94 |
95 |
96 | 97 | setConversationId(conversation['id'])} 100 | /> 101 | 102 | deleteConversation.mutate(conversation.id)} 106 | /> 107 |
108 |
109 | )) 110 | : range(6).map((i) => )} 111 |
112 |
113 | ); 114 | } 115 | 116 | function ItemSkeleton() { 117 | return ( 118 | 119 |
120 | 121 | 122 |
123 |
124 | 125 | 126 |
127 |
128 | ); 129 | } 130 | -------------------------------------------------------------------------------- /app/src/components/LoginForm.tsx: -------------------------------------------------------------------------------- 1 | import { useSupabaseConfig } from '@/utils/useSupabaseConfig'; 2 | import { createClient } from '@supabase/supabase-js'; 3 | import Link from 'next/link'; 4 | import { useRouter } from 'next/router'; 5 | import { useEffect, useState } from 'react'; 6 | import { toast } from 'sonner'; 7 | import { Button } from './ui/button'; 8 | 9 | export default function LoginForm() { 10 | const router = useRouter(); 11 | 12 | const [supabaseUrl, setSupabaseUrl] = useState(''); 13 | const [supabaseToken, setSupabaseToken] = useState(''); 14 | const [password, setPassword] = useState(''); 15 | const [email, setEmail] = useState(''); 16 | 17 | const { 18 | supabaseUrl: savedUrl, 19 | supabaseToken: savedToken, 20 | setSupabaseConfig, 21 | } = useSupabaseConfig(); 22 | 23 | useEffect(() => { 24 | if (savedUrl) { 25 | setSupabaseUrl(savedUrl); 26 | } 27 | if (savedToken) { 28 | setSupabaseToken(savedToken); 29 | } 30 | }, [savedUrl, savedToken]); 31 | 32 | async function emailLogin() { 33 | try { 34 | const supabaseClient = createClient(supabaseUrl, supabaseToken); 35 | const { data, error } = await supabaseClient.auth.signInWithPassword({ 36 | email, 37 | password, 38 | }); 39 | if (error) { 40 | toast.error(error.message); 41 | } else { 42 | toast.success('Login successful'); 43 | setSupabaseConfig(supabaseUrl, supabaseToken); 44 | router.reload(); 45 | } 46 | } catch (error: any) { 47 | console.error('ERROR', error); 48 | toast.error(error.message || error.code || error.msg || 'Unknown error'); 49 | } 50 | } 51 | 52 | return ( 53 |
54 |

Login to ADeus

55 | 56 |
57 |
58 | 61 | setSupabaseUrl(e.target.value)} 67 | className="form-input h-10 w-full rounded-md border-2 pl-2" 68 | required 69 | /> 70 |
71 | 72 |
73 | 76 | setSupabaseToken(e.target.value)} 82 | className="form-input h-10 w-full rounded-md border-2 pl-2" 83 | required 84 | /> 85 |
86 | 87 |
88 | 91 | setEmail(e.target.value)} 97 | className="form-input h-10 w-full rounded-md border-2 pl-2" 98 | required 99 | /> 100 |
101 |
102 | 105 | setPassword(e.target.value)} 111 | className="form-input h-10 w-full rounded-md border-2 pl-2" 112 | required 113 | /> 114 |
115 | 116 |
117 | 120 |
121 |
122 |

123 | Don't have these details? Please check the setup guide{' '} 124 | 125 | here 126 | 127 |

128 |
129 | ); 130 | } 131 | -------------------------------------------------------------------------------- /app/src/components/LogoutButton.tsx: -------------------------------------------------------------------------------- 1 | import { SupabaseClient } from '@supabase/supabase-js'; 2 | import { LogOut } from 'lucide-react'; 3 | import { Button } from './ui/button'; 4 | 5 | export default function LogoutButton({ 6 | supabaseClient, 7 | }: { 8 | supabaseClient: SupabaseClient; 9 | }) { 10 | return ( 11 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/components/NavMenu.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@/components/ui/button'; 2 | import { 3 | Popover, 4 | PopoverContent, 5 | PopoverTrigger, 6 | } from '@/components/ui/popover'; 7 | import { Menu } from 'lucide-react'; 8 | 9 | export function NavMenu({ children }: { children: React.ReactNode }) { 10 | return ( 11 | 12 | 22 | 26 | {children} 27 | 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/components/NewConversationButton.tsx: -------------------------------------------------------------------------------- 1 | import { Plus } from 'lucide-react'; 2 | import { Button } from './ui/button'; 3 | 4 | export default function NewConversationButton({ 5 | createNewConversation, 6 | }: { 7 | createNewConversation: () => void; 8 | }) { 9 | return ( 10 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /app/src/components/PromptForm.tsx: -------------------------------------------------------------------------------- 1 | import { SendHorizontal } from 'lucide-react'; 2 | import React from 'react'; 3 | import { Button } from './ui/button'; 4 | 5 | export default function PromptForm({ 6 | textareaRef, 7 | entryData, 8 | setEntryData, 9 | isDisabled, 10 | sendMessage, 11 | }: { 12 | textareaRef: React.RefObject; 13 | entryData: string; 14 | setEntryData: React.Dispatch>; 15 | isDisabled: boolean; 16 | sendMessage: () => void; 17 | }) { 18 | const handleKeyDown = (e: React.KeyboardEvent) => { 19 | if (e.key === 'Enter' && !e.shiftKey) { 20 | e.preventDefault(); 21 | if (entryData.trim() !== '') { 22 | sendMessage(); 23 | } 24 | } 25 | }; 26 | 27 | return ( 28 |
29 |
35 | 51 | 59 |
60 |
61 | ); 62 | } 63 | -------------------------------------------------------------------------------- /app/src/components/Prose.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function Prose({ children }: { children: React.ReactNode }) { 4 | return ( 5 |
40 | {children} 41 |
42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /app/src/components/SideMenu.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@/components/ui/button'; 2 | import { 3 | Drawer, 4 | DrawerContent, 5 | DrawerFooter, 6 | DrawerHeader, 7 | DrawerTitle, 8 | DrawerTrigger, 9 | } from '@/components/ui/drawer'; 10 | import { SupabaseClient } from '@supabase/supabase-js'; 11 | import { Sidebar } from 'lucide-react'; 12 | import ConversationHistory from './ConversationHistory'; 13 | 14 | export default function SideMenu({ 15 | supabaseClient, 16 | setConversationId, 17 | }: { 18 | supabaseClient: SupabaseClient; 19 | setConversationId: (id: number) => void; 20 | }) { 21 | return ( 22 | 23 | 24 | 31 | 32 | 33 |
34 | 35 | History 36 | 37 | 38 | 42 | 43 |
44 |
45 |
46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /app/src/components/ThemeProvider.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider as NextThemesProvider } from 'next-themes'; 2 | import { type ThemeProviderProps } from 'next-themes/dist/types'; 3 | 4 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 5 | return {children}; 6 | } 7 | -------------------------------------------------------------------------------- /app/src/components/ThemeToggle.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@/components/ui/button'; 2 | import { Moon, Sun } from 'lucide-react'; 3 | import { useTheme } from 'next-themes'; 4 | 5 | export function ThemeToggle() { 6 | const { setTheme, resolvedTheme } = useTheme(); 7 | 8 | function handleToggle() { 9 | if (resolvedTheme === 'dark') { 10 | setTheme('light'); 11 | } else if (resolvedTheme === 'light') { 12 | setTheme('dark'); 13 | } 14 | } 15 | 16 | return ( 17 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/components/ui/button.tsx: -------------------------------------------------------------------------------- 1 | import { Slot } from '@radix-ui/react-slot'; 2 | import { cva, type VariantProps } from 'class-variance-authority'; 3 | import * as React from 'react'; 4 | 5 | import { cn } from '@/utils/cnHelper'; 6 | 7 | const buttonVariants = cva( 8 | 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', 9 | { 10 | variants: { 11 | variant: { 12 | default: 'bg-primary text-primary-foreground hover:bg-primary/90', 13 | destructive: 14 | 'bg-destructive text-destructive-foreground hover:bg-destructive/90', 15 | outline: 16 | 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', 17 | secondary: 18 | 'bg-secondary text-secondary-foreground hover:bg-secondary/80', 19 | ghost: 'hover:bg-accent hover:text-accent-foreground', 20 | link: 'text-primary underline-offset-4 hover:underline', 21 | }, 22 | size: { 23 | default: 'h-10 px-4 py-2', 24 | sm: 'h-9 rounded-md px-3', 25 | lg: 'h-11 rounded-md px-8', 26 | icon: 'h-10 w-10', 27 | }, 28 | }, 29 | defaultVariants: { 30 | variant: 'default', 31 | size: 'default', 32 | }, 33 | } 34 | ); 35 | 36 | export interface ButtonProps 37 | extends React.ButtonHTMLAttributes, 38 | VariantProps { 39 | asChild?: boolean; 40 | } 41 | 42 | const Button = React.forwardRef( 43 | ({ className, variant, size, asChild = false, ...props }, ref) => { 44 | const Comp = asChild ? Slot : 'button'; 45 | return ( 46 | 51 | ); 52 | } 53 | ); 54 | Button.displayName = 'Button'; 55 | 56 | export { Button, buttonVariants }; 57 | -------------------------------------------------------------------------------- /app/src/components/ui/drawer.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Drawer as DrawerPrimitive } from 'vaul'; 3 | 4 | import { cn } from '@/utils/cnHelper'; 5 | 6 | const Drawer = ({ 7 | shouldScaleBackground = true, 8 | ...props 9 | }: React.ComponentProps) => ( 10 | 15 | ); 16 | Drawer.displayName = 'Drawer'; 17 | 18 | const DrawerTrigger = DrawerPrimitive.Trigger; 19 | 20 | const DrawerPortal = DrawerPrimitive.Portal; 21 | 22 | const DrawerClose = DrawerPrimitive.Close; 23 | 24 | const DrawerOverlay = React.forwardRef< 25 | React.ElementRef, 26 | React.ComponentPropsWithoutRef 27 | >(({ className, ...props }, ref) => ( 28 | 33 | )); 34 | DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName; 35 | 36 | const DrawerContent = React.forwardRef< 37 | React.ElementRef, 38 | React.ComponentPropsWithoutRef 39 | >(({ className, children, ...props }, ref) => ( 40 | 41 | 42 | 50 | {children} 51 |
52 | 53 | 54 | )); 55 | DrawerContent.displayName = 'DrawerContent'; 56 | 57 | const DrawerHeader = ({ 58 | className, 59 | ...props 60 | }: React.HTMLAttributes) => ( 61 |
62 | ); 63 | DrawerHeader.displayName = 'DrawerHeader'; 64 | 65 | const DrawerFooter = ({ 66 | className, 67 | ...props 68 | }: React.HTMLAttributes) => ( 69 |
73 | ); 74 | DrawerFooter.displayName = 'DrawerFooter'; 75 | 76 | const DrawerTitle = React.forwardRef< 77 | React.ElementRef, 78 | React.ComponentPropsWithoutRef 79 | >(({ className, ...props }, ref) => ( 80 | 88 | )); 89 | DrawerTitle.displayName = DrawerPrimitive.Title.displayName; 90 | 91 | const DrawerDescription = React.forwardRef< 92 | React.ElementRef, 93 | React.ComponentPropsWithoutRef 94 | >(({ className, ...props }, ref) => ( 95 | 100 | )); 101 | DrawerDescription.displayName = DrawerPrimitive.Description.displayName; 102 | 103 | export { 104 | Drawer, 105 | DrawerClose, 106 | DrawerContent, 107 | DrawerDescription, 108 | DrawerFooter, 109 | DrawerHeader, 110 | DrawerOverlay, 111 | DrawerPortal, 112 | DrawerTitle, 113 | DrawerTrigger, 114 | }; 115 | -------------------------------------------------------------------------------- /app/src/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/utils/cnHelper'; 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes {} 7 | 8 | const Input = React.forwardRef( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | 20 | ); 21 | } 22 | ); 23 | Input.displayName = 'Input'; 24 | 25 | export { Input }; 26 | -------------------------------------------------------------------------------- /app/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as LabelPrimitive from '@radix-ui/react-label'; 2 | import { cva, type VariantProps } from 'class-variance-authority'; 3 | import * as React from 'react'; 4 | 5 | import { cn } from '@/utils/cnHelper'; 6 | 7 | const labelVariants = cva( 8 | 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' 9 | ); 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )); 22 | Label.displayName = LabelPrimitive.Root.displayName; 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /app/src/components/ui/popover.tsx: -------------------------------------------------------------------------------- 1 | import * as PopoverPrimitive from '@radix-ui/react-popover'; 2 | import * as React from 'react'; 3 | 4 | import { cn } from '@/utils/cnHelper'; 5 | 6 | const Popover = PopoverPrimitive.Root; 7 | 8 | const PopoverTrigger = PopoverPrimitive.Trigger; 9 | 10 | const PopoverContent = React.forwardRef< 11 | React.ElementRef, 12 | React.ComponentPropsWithoutRef 13 | >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( 14 | 15 | 25 | 26 | )); 27 | PopoverContent.displayName = PopoverPrimitive.Content.displayName; 28 | 29 | export { Popover, PopoverContent, PopoverTrigger }; 30 | -------------------------------------------------------------------------------- /app/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/utils/cnHelper'; 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ); 13 | } 14 | 15 | export { Skeleton }; 16 | -------------------------------------------------------------------------------- /app/src/components/ui/sonner.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from 'next-themes'; 2 | import { Toaster as Sonner } from 'sonner'; 3 | 4 | type ToasterProps = React.ComponentProps; 5 | 6 | const Toaster = ({ ...props }: ToasterProps) => { 7 | const { theme = 'system' } = useTheme(); 8 | 9 | return ( 10 | 26 | ); 27 | }; 28 | 29 | export { Toaster }; 30 | -------------------------------------------------------------------------------- /app/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/utils/cnHelper'; 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |