- Notifications
You must be signed in to change notification settings - Fork1
Auto post of web page list you read that day.
License
laststance/nsx
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The ultimate goal for this project is release it as a personal blog starter kit for React developers like Minimal Wordpress.
I'm developping essential feature while my spare time, currenty I planning release v1 2028.
All core feature implemented completely, I'm planning distribute repo source directly as similar asBeam.Roadmap
Auto post of web page list you read that day.
Used in combination withnsx-browser-extension.
- Node.js v20.x.x
- pnpm
InstallDocker Desktop
git clone https://github.com/laststance/nsx.gitcd nsxpnpm installcp .env.sample .envdocker-compose up -dpnpm db:resetpnpm validatepnpm server:start- in other terminal screen
pnpm start pnpm e2e:admin- then, you confirmed local develop environment working fine.
open sidebar pressx keyDB seeds initial user account is
name:John Doe
pass:popcoon
These are stored in.env and evaluated at build time.
| Variable Name | Description | Required |
|---|---|---|
| VITE_APP_TITLE | Application title displayed in the UI | Yes |
| VITE_APP_DESCRIPTION | Application description for meta tags | Yes |
| VITE_API_ENDPOINT | Backend API endpoint URL | Yes |
| VITE_SENTRY_DNS | Sentry DSN for error tracking (optional) | No |
| VITE_GA_MEASUREMENT_ID | Google Analytics measurement ID (optional) | No |
| ACCESS_TOKEN_SECRET | Secret key for JWT token generation | Yes |
| DATABASE_URL | MySQL database connection string | Yes |
| OPENAI_API_KEY | OpenAI API key for translation features | No |
| BLUESKY_USERNAME | Bluesky account username for posting integration | No |
| BLUESKY_PASSWORD | Bluesky account password for posting integration | No |
I'm usingPlaywright for E2E testing.
Before runpnpm playwright, you need to runpnpm build:e2e.
- commands
pm2 start ecosystem.config.js // Start Server with production modepm2 restart ecosystem.config.js // Restart Server with production modepm2 stop 0 // Stop serverpm2 ps -a // Show all processes- Setup Ubuntu server onDigital Ocean orFly.io
- Update ubuntu with
apt upgrade - seehttps://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04
cd ~ && git clone https://github.com/laststance/nsx.gitcd nsxand installvoltasource ~/.bashrc&&volta install nodepnpm- install docker on Ubuntuhttps://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
- docker compose up -d
- pnpm db:migrate
- touch .env.prod
- npm i -g pm2
touch .env && echo "ACCESS_TOKEN_SECRET=$(openssl rand -base64 60 | tr -d '\n' | cut -c1-60)" >> .envpm2 start ecosystem.config.js- Access from browser
GitHub Repository (main branch) │ │ Push / PR Merge ▼GitHub Actions Workflow │ │ 1. Checkout code │ 2. Setup Node.js & pnpm │ 3. Install dependencies │ 4. Build frontend & backend ▼ Build Artifacts │ │ Upload via SCP ▼DigitalOcean Server │ │ 1. Create .env from secrets │ 2. Install production dependencies │ 3. PM2 restart ▼Running Application (https://nsx.malloc.tokyo/)NSX includes several utility scripts in thescripts/ directory to help with common development and deployment tasks:
# Deploy both frontend and backend to production./scripts/deploy# Deploy only backend./scripts/deploy -s# Deploy only frontend./scripts/deploy -f
The deploy script uses rsync to upload build artifacts to the production server.
# Create a database backup and download it to your local machine./scripts/backupThis script connects to the production server, creates a MySQL database dump from the Docker container, and downloads it to your local machine.
# Restore a database from a backup file./scripts/restore backup_20240101.sqlThis script uploads a local backup file to the production server and restores the database from it.
# Run all validation checks at once./scripts/validateThe validate script runs tests, linting, type checking, and build in parallel to ensure code quality.
About
Auto post of web page list you read that day.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors7
Uh oh!
There was an error while loading.Please reload this page.
