Open-source communication platform. Privacy-focused. Community-driven.
Sword is a modern, privacy-first chat application built with TypeScript that prioritizes end-to-end encryption, open source transparency, and community ownership. This project serves as an alternative to Discord with a focus on user privacy and data sovereignty.
- End-to-end Encryption - Your conversations stay private
- Open Source - Transparent, auditable codebase
- Community Owned - Built by and for the community
- Cross-platform - Web and desktop applications
- Self-hostable - Deploy your own instance
- TypeScript - For type safety and improved developer experience
- TanStack Router - File-based routing with full type safety
- TailwindCSS - Utility-first CSS for rapid UI development
- shadcn/ui - Beautiful, accessible UI components
- Hono - Lightweight, performant server framework
- tRPC - End-to-end type-safe APIs
- Drizzle - TypeScript-first ORM
- PostgreSQL - Reliable database engine
- Authentication - Secure email & password authentication
- Biome - Linting and formatting
- Tauri - Native desktop applications
- Turborepo - Optimized monorepo build system
First, install the dependencies:
bun install
Sword uses PostgreSQL with Drizzle ORM for data persistence.
- Make sure you have a PostgreSQL database set up.
- Update your
apps/server/.env
file with your PostgreSQL connection details. - Apply the schema to your database:
bun db:push
Run the development server:
bun dev
- Web application: http://localhost:3001
- API server: http://localhost:3000
sword/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Router)
│ └── server/ # Backend API (Hono, TRPC)
└── packages/ # Shared packages and utilities
bun dev
: Start all applications in development modebun build
: Build all applications for productionbun dev:web
: Start only the web applicationbun dev:server
: Start only the serverbun check-types
: Check TypeScript types across all appsbun db:push
: Push schema changes to databasebun db:studio
: Open database studio UIbun check
: Run Biome formatting and lintingcd apps/web && bun desktop:dev
: Start Tauri desktop app in developmentcd apps/web && bun desktop:build
: Build Tauri desktop app for production
We welcome contributions from the community! Please read our contributing guidelines and join us in building the future of open-source communication.
This project is open source and available under the MIT License.
Made with ❤️ by the community