Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Auto post of web page list you read that day.

License

NotificationsYou must be signed in to change notification settings

laststance/nsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BuildTypecheckTestLintChromaticPlaywright Admin TestsPlaywright Selfhost TestsPlaywright Visitor TestsAsk DeepWiki

Project Status: currently under development and scheduled for release in release 2028.

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

NSX

⚛️ProductionStorybook

Auto post of web page list you read that day.

Used in combination withnsx-browser-extension.

Prerequisites

  • Node.js v20.x.x
  • pnpm

Getting start local development

  1. git clone https://github.com/laststance/nsx.git
  2. cd nsx
  3. pnpm install
  4. cp .env.sample .env
  5. docker-compose up -d
  6. pnpm db:reset
  7. pnpm validate
  8. pnpm server:start
  9. in other terminal screenpnpm start
  10. pnpm e2e:admin
  11. then, you confirmed local develop environment working fine.

open sidebar pressx keyDB seeds initial user account is
name:John Doe
pass:popcoon

Environment Variables

These are stored in.env and evaluated at build time.

Variable NameDescriptionRequired
VITE_APP_TITLEApplication title displayed in the UIYes
VITE_APP_DESCRIPTIONApplication description for meta tagsYes
VITE_API_ENDPOINTBackend API endpoint URLYes
VITE_SENTRY_DNSSentry DSN for error tracking (optional)No
VITE_GA_MEASUREMENT_IDGoogle Analytics measurement ID (optional)No
ACCESS_TOKEN_SECRETSecret key for JWT token generationYes
DATABASE_URLMySQL database connection stringYes
OPENAI_API_KEYOpenAI API key for translation featuresNo
BLUESKY_USERNAMEBluesky account username for posting integrationNo
BLUESKY_PASSWORDBluesky account password for posting integrationNo

Playwright

I'm usingPlaywright for E2E testing.
Before runpnpm playwright, you need to runpnpm build:e2e.

Production Server

  • 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 Procution Server

  1. Setup Ubuntu server onDigital Ocean orFly.io
  2. Update ubuntu withapt upgrade
  3. seehttps://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04
  4. cd ~ && git clone https://github.com/laststance/nsx.git
  5. cd nsx and installvolta
  6. source ~/.bashrc &&volta install node
  7. pnpm
  8. install docker on Ubuntuhttps://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
  9. docker compose up -d
  10. pnpm db:migrate
  11. touch .env.prod
  12. npm i -g pm2
  13. touch .env && echo "ACCESS_TOKEN_SECRET=$(openssl rand -base64 60 | tr -d '\n' | cut -c1-60)" >> .env
  14. pm2 start ecosystem.config.js
  15. Access from browser

Deploy Flow

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/)

Utility Scripts

NSX includes several utility scripts in thescripts/ directory to help with common development and deployment tasks:

Deploy Script

# 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.

Database Backup

# Create a database backup and download it to your local machine./scripts/backup

This script connects to the production server, creates a MySQL database dump from the Docker container, and downloads it to your local machine.

Database Restore

# Restore a database from a backup file./scripts/restore backup_20240101.sql

This script uploads a local backup file to the production server and restores the database from it.

Code Validation

# Run all validation checks at once./scripts/validate

The validate script runs tests, linting, type checking, and build in parallel to ensure code quality.


[8]ページ先頭

©2009-2025 Movatter.jp