Nym
An open-source personal website infrastructure for developers
Install / Use
/learn @Nym-HQ/NymREADME
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 automaticallyNEXT_PUBLIC_VERCEL_ENV(production|preview|development) Set automaticallyVERCEL_URL(https://{nym-xyz}.vercel.app) Set automaticallyNEXT_PUBLIC_VERCEL_URL(https://{nym-xyz}.vercel.app) Set automaticallyPUBLIC_URL(https://nymhq.com)VERCEL_TEAM_IDVercel Team IDVERCEL_PROJECT_IDVercel Project IDVERCEL_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_SECRETJWT_SIGNING_KEYGITHUB_IDGITHUB_SECRETTWITTER_API_KEYUse Twitter API KeyTWITTER_API_SECRETUse Twitter API Secret
Cloudinary
CLOUDINARY_CLOUD_NAME- Cloudinary Cloud nameCLOUDINARY_API_KEY- Cloudinary API KEYCLOUDINARY_API_SECRET- Cloudinary API SecretCLOUDINARY_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_KEYPINECONE_ENVIRONMENTPINECONE_API_KEY
Setting up DB for development environment
Using PlanetScale
- Login to https://app.planetscale.com/
- Create a DB.
- Copy the connection string for the DB, and set it to the .env file variables. (See PlanetScale Doc)
- Run migration
yarn prisma migrate dev
Migrating DB (PScale and Prisma)
During Development
- Edit
prisma/schema.prisma - Format the schema doc
yarn prisma format
- 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
mainbranch as a production branch - Create a
devbranch frommainbranch - Make sure you connect to the
devbranch only, not to themainbranch directly. - When you want to deploy changes from
devtomain, go to https://app.planetscale.com/sov-ventures/nymhq/deploy-requests and create deployment request fromdevbranch tomainbranch.
Nym is a fork of the briOS project
https://github.com/brianlovin/briOS
Related Skills
tmux
350.1kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
diffs
350.1kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
blogwatcher
350.1kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
FastGPT
27.6kFastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
