https://github.com/laststance/nsx
Auto post of web page list you read that day.
https://github.com/laststance/nsx
express full-stack fullstack-typescript react storybook tailwindcss vite
Last synced: about 2 months ago
JSON representation
Auto post of web page list you read that day.
- Host: GitHub
- URL: https://github.com/laststance/nsx
- Owner: laststance
- License: mit
- Created: 2020-10-16T16:59:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-24T20:03:51.000Z (2 months ago)
- Last Synced: 2025-04-24T20:42:40.179Z (2 months ago)
- Topics: express, full-stack, fullstack-typescript, react, storybook, tailwindcss, vite
- Language: TypeScript
- Homepage: https://nsx.malloc.tokyo/
- Size: 25.4 MB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/laststance/nsx/actions/workflows/build.yml)
[](https://github.com/laststance/nsx/actions/workflows/typecheck.yml)
[](https://github.com/laststance/nsx/actions/workflows/test.yml)
[](https://github.com/laststance/nsx/actions/workflows/lint.yml)
[](https://github.com/laststance/nsx/actions/workflows/chromatic.yml)
[](https://github.com/laststance/nsx/actions/workflows/playwright_admin.yml)
[](https://github.com/laststance/nsx/actions/workflows/playwright_selfhost.yml)
[](https://github.com/laststance/nsx/actions/workflows/playwright_visitor.yml)> # 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 as [Beam](https://github.com/planetscale/beam).
> [Roadmap](https://github.com/laststance/nsx/projects/1)# NSX
⚛️ [Production](https://nsx.malloc.tokyo/) ✅ [Storybook](https://main--61c089c06b3b4d003adde63b.chromatic.com)
Auto post of web page list you read that day.
Used in combination with [nsx-browser-extension](https://github.com/laststance/nsx-browser-extension).
# Prerequisites
- Node.js v20.x.x
- pnpm#### Install [Docker Desktop](https://www.docker.com/products/docker-desktop/)
# Getting start local development
1. `git clone https://github.com/laststance/nsx.git`
1. `cd nsx`
1. `pnpm install`
1. `cp .env.sample .env`
1. `docker-compose up -d`
1. `pnpm db:reset`
1. `pnpm validate`
1. `pnpm server:start`
1. in other terminal screen `pnpm start`
1. `pnpm e2e:admin`
1. then, you confirmed local develop environment working fine.open sidebar press `x` key
DB seeds initial user account is
name: `John Doe`
pass: `popcoon`## Enviroment Variables
These are storing `.env` and evaluate at build time.
| Variable Name | Role | other |
| --------------------- | ------------------- | ----- |
| VITE_APP_TITLE | title | |
| VITE_APP_DESCRIPTION | desc | |
| VITE_API_ENDPOINT | end | |
| VITE_SENTRY_DNS | sentry | |
| VITE_GA_TRACKING_CODE | ga | |
| ACCESS_TOKEN_SECRET | JWT | |
| DATABASE_URL | Database | |
| BROWSER | open via dev server | |## Playwright
I'm using [Playwright](https://playwright.dev/) for E2E testing.
Before run `pnpm playwright`, you need to run `pnpm build:e2e`.## Production Server
- commands
```
pm2 start ecosystem.config.js // Start Server with production mode
pm2 restart ecosystem.config.js // Restart Server with production mode
pm2 stop 0 // Stop server
pm2 ps -a // Show all processes```
## Setup Procution Server
1. Setup Ubuntu server on [Digital Ocean](https://www.digitalocean.com/) or [Fly.io](https://fly.io/)
1. Update ubuntu with `apt upgrade`
1. see https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04
1. `cd ~ && git clone https://github.com/laststance/nsx.git`
1. `cd nsx` and install [volta](https://volta.sh/)
1. `source ~/.bashrc` && `volta install node`
1. `pnpm`
1. install docker on Ubuntu https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository
1. docker compose up -d
1. pnpm db:migrate
1. touch .env.prod
1. npm i -g pm2
1. `touch .env && echo "ACCESS_TOKEN_SECRET=$(openssl rand -base64 60 | tr -d '\n' | cut -c1-60)" >> .env`
1. `pm2 start ecosystem.config.js`
1. 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/)
```