Skip to content

codingCoffee/semaphore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The simplest, no nonsense AI chat app!

Demo

semaphore.chat

Local Install

  • Execute these commands. (assuming you have docker and docker-compose installed on your system, if not, install them first.)
git clone https://github.com/codingCoffee/semaphore

cd semaphore

docker compose up -d

# wait for a min
docker compose exec frontend npm run db:migrate

Notable Features

- 💬 Chat with Various LLMs

Engage with multiple large language models in one seamless interface.

- 🔒 Authentication & Sync

Secure your conversations and sync chats across devices with Google Login

- 🌐 Browser Friendly

Works smoothly in all modern web browsers—no installation required.

- 🔍 Web Search (Beta)

Fetch information from the web right within your chat (experimental feature).

- ⏯️ Resumable Streams

Resume, or replay chat streams for uninterrupted workflows.

resumable-streams.mp4
- 📊 MermaidJS Diagram Renders

Visualize diagrams and flowcharts with MermaidJS integration.

- 💡 Code Syntax Highlighting

Enjoy beautifully highlighted code snippets for better readability.

- 🌙 Dark Mode

Switch between light and dark themes for comfortable browsing.

- 🔑 Bring Your Own Keys

Use your own API keys for enhanced privacy and customization.

- 📱 Mobile Friendly

Fully responsive design for a great experience on smartphones and tablets.

Architecture

graph TD

    %% Frontend
    A[Next.js Client] -->|HTTP /chat API| B[Next.js Server]

    %% Next.js Server to Zero-Client
    A -->|ZQL| C[Zero-Client]

    %% Zero-Cache and Postgres
    C <-->|"sync (WebSocket)"| D[Zero-Cache]
    D -->|"write to db (SQL)"| E[PostgreSQL Database]
    E -->|"logical replication"| D

    %% OpenRouter
    B --> F[OpenRouter]
    F --> B

    %% Write
    B --> E
Loading

Prod Deployment

npm run db:migrate

Contributing

semaphore is free and open source software licensed under Apache-2.0 license. If you are interested in contributing, feel free to open up a PR.

  • The app is in NextJS with Typescipt support, tailwind for CSS and shadcn is used for the component library
  • Postgres is used for the database
  • Zero by Replicache is used for the sync engine, and to achieve resumable streams :)

Authors

License

semaphore is licensed under the Apache-2.0 License

About

The simplest, no nonsense AI chat app!

Topics

Resources

License

Stars

Watchers

Forks

Languages