MCPcopy Index your code
hub / github.com/Nym-HQ/nym

github.com/Nym-HQ/nym @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
902 symbols 2,350 edges 346 files 23 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Nym

An open source solution for personal blogs, bookmarks, newsletters & notes.

App Domain structure

The system will consist of 3 different apps hosted separately.

Main app/admin site (e.g: https://app.nymhq.com)

Administrative app to manage your admin account and registered sites.

Site setup & Mult-tenant (https://{user-subdomain}.nymhq.com or any parked domain)

Same app as the main app site, but the visible content will be different. This is for registered users and sites to show contents and manage contents.

Developer Notes

Environment values (.env)

  • NODE_ENV (production|development)
  • VERCEL_ENV (production|preview|development) Set automatically
  • NEXT_PUBLIC_VERCEL_ENV (production|preview|development) Set automatically
  • VERCEL_URL (https://{nym-xyz}.vercel.app) Set automatically
  • NEXT_PUBLIC_VERCEL_URL (https://{nym-xyz}.vercel.app) Set automatically
  • PUBLIC_URL (https://nymhq.com)
  • VERCEL_TEAM_ID Vercel Team ID
  • VERCEL_PROJECT_ID Vercel Project ID
  • VERCEL_API_TOKEN (https://vercel.com/docs/rest-api#introduction/api-basics/authentication) Token to access Vercel's API

Prisma and PlanetScale

A good resource to understand Prisma and its Shadow DB https://www.prisma.io/docs/concepts/components/prisma-migrate/shadow-database
https://blog.tericcabrel.com/understand-the-shadow-database-feature-prisma/

  • DATABASE_URL (mysql://user:password@host:port/database)
  • SHADOW_DATABASE_URL (Only required for local env where we run migration commands)

NextAuth.js

  • NEXTAUTH_URL (https://nymhq.com)
  • NEXTAUTH_SECRET
  • JWT_SIGNING_KEY
  • GITHUB_ID
  • GITHUB_SECRET
  • TWITTER_API_KEY Use Twitter API Key
  • TWITTER_API_SECRET Use Twitter API Secret

Cloudinary

  • CLOUDINARY_CLOUD_NAME - Cloudinary Cloud name
  • CLOUDINARY_API_KEY - Cloudinary API KEY
  • CLOUDINARY_API_SECRET - Cloudinary API Secret
  • CLOUDINARY_PRESET - Preset name created on Cloudinary, make sure you set the "Signed" property to true

IFramely

  • IFRAMELY_API_KEY - Iframely API key - to extract metadata from a url

Configurations for Chat Bot

  • OPENAI_API_KEY
  • PINECONE_ENVIRONMENT
  • PINECONE_API_KEY

Setting up DB for development environment

Using PlanetScale

  1. Login to https://app.planetscale.com/
  2. Create a DB.
  3. Copy the connection string for the DB, and set it to the .env file variables. (See PlanetScale Doc)
  4. Run migration yarn prisma migrate dev

Migrating DB (PScale and Prisma)

During Development

  1. Edit prisma/schema.prisma
  2. Format the schema doc
yarn prisma format
  1. Migrate dev db
# Check the changes in the current schema (prisma/schema.prisma)
# and generate migration file, push to DB.
yarn prisma migrate dev

For Production Deployment

  • On PlanetScale, Configure main branch as a production branch
  • Create a dev branch from main branch
  • Make sure you connect to the dev branch only, not to the main branch directly.
  • When you want to deploy changes from dev to main, go to https://app.planetscale.com/sov-ventures/nymhq/deploy-requests and create deployment request from dev branch to main branch.

Nym is a fork of the briOS project

https://github.com/brianlovin/briOS

Extension points exported contracts — how you extend this code

NewsletterProviderBase (Interface)
(no doc) [2 implementers]
src/lib/newsletter/providers/ProviderBase.ts
Props (Interface)
(no doc)
src/components/Bookmarks/BookmarkListItem.tsx
MemberListItemProps (Interface)
(no doc)
src/pages/_sites/[site]/admin/members.tsx
Props (Interface)
(no doc)
src/hooks/useWindowFocus.ts
SEOProps (Interface)
(no doc)
src/config/seo.ts
CommonPageProps (Interface)
(no doc)
src/lib/commonProps.ts
Props (Interface)
(no doc)
src/components/Writing/PostListItem.tsx
ChatBotGenerateRequest (Interface)
(no doc)
src/lib/chatbot/types.ts

Core symbols most depended-on inside this repo

cn
called by 52
src/lib/utils.ts
getContext
called by 49
src/graphql/context/index.ts
stylerAttrOptions
called by 45
src/lib/tweet/parser.ts
initApolloClient
called by 37
src/lib/apollo/index.ts
getCommonPageProps
called by 34
src/lib/commonProps.ts
getCommonQueries
called by 34
src/lib/apollo/common.ts
addApolloState
called by 34
src/lib/apollo/index.ts
mapClassOptions
called by 21
src/lib/tweet/parser.ts

Shape

Function 714
Interface 109
Method 53
Class 18
Enum 8

Languages

TypeScript100%

Modules by API surface

src/graphql/types.generated.ts87 symbols
src/lib/tweet/utils/types.ts55 symbols
src/components/chat/ui/icons.tsx27 symbols
src/components/Icon/index.tsx26 symbols
src/components/EditorJS/AnyButtonTool.tsx19 symbols
src/lib/newsletter/providers/mailchimp.tsx14 symbols
src/lib/newsletter/providers/revue.tsx12 symbols
src/components/Bookmarks/EditBookmarkForm.tsx12 symbols
src/pages/_sites/[site]/admin/settings.tsx10 symbols
src/lib/chatbot/train.ts10 symbols
src/components/EditorJS/CustomLinkTool.tsx10 symbols
src/components/Tag/TagPicker.tsx9 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add nym \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact