Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed page.tsx #19

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SPEECH_REGION=
# Deepgram Speech to Text
DG_API_KEY=
# Huggingface
HF_EMOTION_API_URL=https://api-inference.huggingface.co/models/SamLowe/roberta-base-go_emotions
HF_ACCESS_TOKEN=
# Below 2 lines are optional
AZURE_OPENAI_ENDPOINT=
Expand Down Expand Up @@ -40,5 +41,4 @@ CELERY_FLOWER_PASSWORD=admin

NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
# Optional for OAuth
GOOGLE_OAUTH=False

GOOGLE_OAUTH=False
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.github/workflows/* merge=ours
backend/kubernetes/* merge=ours
firmware/test/* merge=ours
93 changes: 0 additions & 93 deletions .github/workflows/build.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/test-fastapi.yaml

This file was deleted.

112 changes: 57 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ Starmoon is an affordable, compact AI-enabled device, you can take anywhere and
<div align="center">
<img src="./usecases.png" alt="Starmoon-logo" width="100%" padding-bottom: 20px"/>

[![Discord Follow](https://dcbadge.vercel.app/api/server/HUpRgp2HG8?style=flat)](https://discord.gg)
[![Discord Follow](https://dcbadge.vercel.app/api/server/KJWxDPBRUj?style=flat)](https://discord.gg/KJWxDPBRUj)

[![License: GPLv3](https://img.shields.io/badge/license-GPLv3-blue)](https://www.gnu.org/licenses/gpl-3.0.en.html)&ensp;&ensp;&ensp;

<!-- [![GitHub Repo stars](https://img.shields.io/github/stars/quivrhq/quivr?style=social)](https://github.com/StarmoonAI/Starmoon) -->
<!-- [![Twitter Follow](https://img.shields.io/twitter/follow/StanGirard?style=social)](https://twitter.com/_StanGirard) -->
</div>

## Demo Highlights 🎥

Video
https://github.com/user-attachments/assets/89394491-9d87-48ab-b2df-90028118450b

If you can't see the video, you can watch it [here](https://www.youtube.com/watch?v=59rwFuCMviE)

## Key features 🎯

- **Cost-effective**: Assemble the device yourself with affordable off-the-shelf components.
- **Voice-enabled emotional intelligence**: Understand and analyze insights in your emotions through your conversations in real time.
- **Open-source**: Fully open-source, you can deploy Starmoon locally and self-host to ensure the privacy of your data.
- **Compact device**: Only slightly larger than an Apple Watch, you can carry the device anywhere.
- **Reduced screen time**: A myriad of AI companions are screen-based, and our intention is to give your eyes a rest.
- **Cost-effective**: Assemble the device yourself with affordable off-the-shelf components.
- **Voice-enabled emotional intelligence**: Understand and analyze insights in your emotions through your conversations in real time.
- **Open-source**: Fully open-source, you can deploy Starmoon locally and self-host to ensure the privacy of your data.
- **Compact device**: Only slightly larger than an Apple Watch, you can carry the device anywhere.
- **Reduced screen time**: A myriad of AI companions are screen-based, and our intention is to give your eyes a rest.

## Getting Started 🚀

Expand All @@ -51,18 +51,18 @@ Video
- [LED light](https://www.aliexpress.us/item/3256805384408000.html)
- [Button](https://www.aliexpress.us/item/3256803815119722.html)
- [PCB prototype board](https://www.aliexpress.com/item/1005005038301414.html)
- [3D printed case](case_model.ufp)
- [3D printed case](case_model.stl)
- Tools: [28AWG wires](https://www.aliexpress.us/item/3256801511896966.html) + [soldering toolset](https://www.aliexpress.com/item/1005007010143403.html) + [flux](https://www.aliexpress.com/item/1005007003481283.html)

### Software setup 🖥️

- **Step 0**: Clone the repository:
- **Step 0**: Clone the repository:

```bash
git clone https://github.com/StarmoonAI/Starmoon.git && cd starmoon
```

- **Step 1**: Set up Supabase:
- **Step 1**: Set up Supabase:

```bash
supabase start
Expand All @@ -72,83 +72,85 @@ Video
supabase db reset
```

- **Step 2**: Copy the `.env.example` files
- **Step 2**: Copy the `.env.example` files

```bash
cp .env.example .env
```

- **Step 3**: Update tokens in the `.env` file
- For local set up, you only need to update `OPENAI_API_KEY`, `MS_SPEECH_ENDPOINTY`, `SPEECH_KEY`, `SPEECH_REGION`, `DG_API_KEY`, `HF_ACCESS_TOKEN`
- **Step 4**: Launch the project
- **Step 3**: Update tokens in the `.env` file
- For local set up, you only need to update `OPENAI_API_KEY`, `MS_SPEECH_ENDPOINTY`, `SPEECH_KEY`, `SPEECH_REGION`, `DG_API_KEY`, `HF_ACCESS_TOKEN`
- **Step 4**: Launch the project

- If you have a Mac, go to Docker Desktop > Settings > General and check that the "file sharing implementation" is set to `VirtioFS`.
- If you have a Mac, go to Docker Desktop > Settings > General and check that the "file sharing implementation" is set to `VirtioFS`.

```bash
docker compose pull
docker compose up
```
```bash
docker compose pull
docker compose up
```

If you are a **developer**, you can run the project in development mode with the following command: `docker compose -f docker-compose.yml up --build`
If you are a **developer**, you can run the project in development mode with the following command: `docker compose -f docker-compose.yml up --build`

- **Step 5**: Login to the app
- **Step 5**: Login to the app

- You can now sign in to the app with `[email protected]` & `admin`. You can access the Starmoon webapp at [http://localhost:3000/login](http://localhost:3000/login) and sign up an account
- You can now sign in to the app with `[email protected]` & `admin`. You can access the Starmoon webapp at [http://localhost:3000/login](http://localhost:3000/login) and sign up an account

- You can access Starmoon backend API at [http://localhost:8000/docs](http://localhost:8000/docs)
- You can access Starmoon backend API at [http://localhost:8000/docs](http://localhost:8000/docs)

- You can access Supabase dashboard at [http://localhost:54323](http://localhost:54323)
- You can access Supabase dashboard at [http://localhost:54323](http://localhost:54323)

- You can access Celery Flower background task dashboard at [http://localhost:5555](http://localhost:5555) (`admin` & `admin`)
- You can access Celery Flower background task dashboard at [http://localhost:5555](http://localhost:5555) (`admin` & `admin`)

### Hardware setup 🧰

- **Step 0 (Optional)**: Build the device yourself (alternatively, the [Starmoon DIY Dev Kit](https://www.starmoon.app/products) comes pre-assembled so you can focus on working with your own frontend + backend)
- **Step 0 (Optional)**: Build the device yourself (alternatively, the [Starmoon DIY Dev Kit](https://www.starmoon.app/products) comes pre-assembled so you can focus on working with your own frontend + backend)

- Follow the instructions [here](firmware/README.md) in Pin Configuration section for more details on assembly

- **Step 1**: Click PlatformIO Icon in VScode left sidebar

- Follow the instructions [here](firmware/README.md) in Pin Configuration section for more details on assembly
- Click "Pick a folder"
- Select the location of the `firmware` folder in the current project.

- **Step 1**: Click PlatformIO Icon in VScode left sidebar
- **Step 2**: Update and WebSocket server details in `src/main.cpp`

- Click "Pick a folder"
- Select the location of the `firmware` folder in the current project.
- Find your WiFi ip adress (websocket_server_host) by command `ipconfig` (under `Default Gateway`) in Windows or `ifconfig` (under `inet xxx.x.x.x netmask 0xff000000`) in Linux/MacOS, or you can also follow the instructions [here](https://nordvpn.com/blog/find-router-ip-address/)

- **Step 2**: Update and WebSocket server details in `src/main.cpp`
- Find your WiFi ip adress (websocket_server_host) by command `ipconfig` (under `Default Gateway`) in Windows or `ifconfig` (under `inet xxx.x.x.x netmask 0xff000000`) in Linux/MacOS, or you can also follow the instructions [here](https://nordvpn.com/blog/find-router-ip-address/)
```cpp

```cpp
// WebSocket setup
const char *websocket_server_host = "<your-server-host-ip>"; // Wifi settings -> Your Wifi I.P.
const uint16_t websocket_server_port = 8000;
const char *websocket_server_path = "/starmoon";
const char *auth_token = "<your-STARMOON_API_KEY-here>"; // generate your STARMOON_API_KEY in your starmoon account settings page
```

// WebSocket setup
const char *websocket_server_host = "<your-server-host-ip>"; // Wifi settings -> Your Wifi I.P.
const uint16_t websocket_server_port = 8000;
const char *websocket_server_path = "/starmoon";
const char *auth_token = "<your-STARMOON_API_KEY-here>"; // generate your STARMOON_API_KEY in your starmoon account settings page
```
- **Step 3**: Build the firmware

- **Step 3**: Build the firmware
- Click `Build` button in the PlatformIO toolbar or run the build task.

- Click `Build` button in the PlatformIO toolbar or run the build task.
- **Step 4**: Upload the firmware to the device
- Connect your ESP32-S3 to your computer using usb.
- Click the `Upload` button to run the upload task, or `Upload and Monitor` button to run the upload task and monitor the device.
- **Step 5**: Hardware usage

- **Step 4**: Upload the firmware to the device
- Connect your ESP32-S3 to your computer using usb.
- Click the `Upload` button to run the upload task, or `Upload and Monitor` button to run the upload task and monitor the device.
- **Step 5**: Hardware usage
- Power the device -> Use your phone/tablet/pc to connect "Starmoon device" WiFi and follow the instructions to set up internet connection (only support 2.4Ghz WiFi).
- Once the software and firmware are set up, you can push the button to power on the ESP32 device and start talking to the device.
- Power the device -> Use your phone/tablet/pc to connect "Starmoon device" WiFi and follow the instructions to set up internet connection (only support 2.4Ghz WiFi).
- Once the software and firmware are set up, you can push the button to power on the ESP32 device and start talking to the device.

<!-- - The LED indicates the current status:
- Off: Not connected
- Solid On: Connected and listening on microphone
- Pulsing: Streaming audio output (receiving from server) -->
<!-- - The LED indicates the current status:
- Off: Not connected
- Solid On: Connected and listening on microphone
- Pulsing: Streaming audio output (receiving from server) -->

## Updating Starmoon App 🚀

- **Step 1**: Pull the latest changes
- **Step 1**: Pull the latest changes

```bash
git pull
```

- **Step 2**: Update the migration
- **Step 2**: Update the migration

```bash
supabase migration up
Expand Down
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ docker run -p 6379:6379 --name starmoon-redis -d redis
### Run server (in different terminals)

```bash
poetry run uvicorn app.main:app --ws-ping-interval 600 --ws-ping-timeout 600 --reload
poetry run uvicorn app.main:app --ws-ping-interval 600 --ws-ping-timeout 600 --reload --host 0.0.0.0
poetry run celery -A app.celery.worker.celery_app worker --loglevel=info
poetry run celery -A app.celery.worker.celery_app flower --port=5555
poetry run celery -A app.celery.worker.celery_app beat --loglevel=info
Expand Down
Loading