Skip to content

omsimos/umamin

Umamin

An open-source social platform for sending and receiving encrypted anonymous messages. πŸ”

actions releases stars

Contributing

If you like this project, please consider giving it a star! ✨ If you wish to suggest or work on a new feature, please open an issue to discuss with the community and the project maintainers. We appreciate your interest and look forward to collaborating with you!

Monorepo Setup

Core Packages Description
www Umamin Q&A & landing page
social Umamin Social (coming soon)
@umamin/db Database schema & migrations using Drizzle ORM
@umamin/gql GraphQL schema models and resolvers using Pothos
@umamin/aes Encryption algorithm using AES in Galois/Counter Mode (AES-GCM)
@umamin/e2e End-to-end testing suite using Playwright

Prerequisites

  • Turso CLI (for local libSQL server)
  • Node.js >= 20 or nvm
  • pnpm >= 9

Install Dependencies

If you're using nvm, you can easily switch to the required Node.js version.

$ nvm use 20 # ignore if you're already on Node.js >= 20
$ pnpm install

Environment Variables

# apps/www/.env
NEXT_PUBLIC_GQL_URL=http://localhost:3000/api/graphql
TURSO_CONNECTION_URL=http://127.0.0.1:8080
AES_KEY=7ruID/GBuS2PGiysV9KXMZ6CkC1xuUKJFWEPLYgPPo0= # must be a valid AES-GCM key

# packages/db/.env
TURSO_CONNECTION_URL=http://127.0.0.1:8080

To generate your own AES_KEY, you can use the generateAesKey() function.

import { generateAesKey } from "@umamin/aes";

const key = await generateAesKey();

If you need to use Google OAuth, you must setup your own OAuth client. Setting up OAuth 2.0 β†’

# apps/www/.env
GOOGLE_CLIENT_ID=YOUR_CLIENT_ID
GOOGLE_CLIENT_SECRET=YOUR_CLIENT_SECRET
GOOGLE_REDIRECT_URI=http://localhost:3000/login/google/callback

Development Server

You can specify which app to run a development server by including a scope (www or social).

$ pnpm dev:[scope] # dev:www

Setup Database

Running a development server automatically creates a libSQL database. Run the migration command below to apply the schema.

$ pnpm db:migrate # or db:push

Running Build

After making changes, you can run a build which will check for lint and type errors.

$ pnpm build:[scope] 

Once ready, you can submit a pull request for review.

Contributor List

Security

If you believe you have found a security vulnerability in Umamin, please do not open a public issue on this repository. Opening a public issue could expose sensitive information before it's addressed. Please read our Security Policy for details on how to report a vulnerability.

License

Umamin is licensed under GPL-3.0