setup instructions + script

main
Samuel Gbafa 2 months ago
parent 81db6207da
commit 3194f76839
  1. 5
      .claude/commands/swap-branch.md
  2. 5
      .claude/commands/sync-branch.md
  3. 5
      .claude/commands/sync-main.md
  4. 129
      README.md
  5. 85
      scripts/setup.sh

@ -0,0 +1,5 @@
This command is being called by someone who does not know what git is. Your job is to do the process on their behalf.
Create a new git branch.
Optional context for naming: #$ARGUMENTS

@ -0,0 +1,5 @@
This command is being called by someone who does not know what git is. Your job is to do the process on their behalf.
Check for changes on this branch and pull down the latest changes. If there are conflicts, ask the user if they would like to prioritize their changes or the incoming changes.
Optional context from the user: #$ARGUMENTS

@ -0,0 +1,5 @@
This command is being called by someone who does not know what git is. Your job is to do the process on their behalf.
Pull down the latest changes from the main branch. Switch to this branch. If there are conflicts ask the user in a simple way if the changes should be merged or discarded.
Optional context: #$ARGUMENTS

@ -1,69 +1,66 @@
# React + TypeScript + Vite # Personal Network Manager
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. A modern web application for building and managing your professional network. Import contacts from LinkedIn, organize connections, and grow your network with QR code invitations.
Currently, two official plugins are available: ## ✨ Features
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh - **LinkedIn Integration** - Import your professional connections
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - **Contact Management** - Organize and track your network
- **QR Code Invitations** - Share your network invitation via QR codes
## Expanding the ESLint configuration - **Professional Dashboard** - Clean, modern interface with Material-UI
- **Responsive Design** - Works seamlessly on desktop and mobile
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: - **Onboarding Flow** - Guided setup for new users
```js
export default tseslint.config([ ## Initial Setup
globalIgnores(['dist']), ```bash
{ # install node + bun
files: ['**/*.{ts,tsx}'], ./scripts/setup.sh
extends: [ source ~/.zshrc
// Other configs...
// Remove tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
``` ```
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: ## 🚀 Quick Start
```js ```bash
// eslint.config.js # install dependencies
import reactX from 'eslint-plugin-react-x' bun install
import reactDom from 'eslint-plugin-react-dom'
# run locally
export default tseslint.config([ bun dev
globalIgnores(['dist']), ```
{
files: ['**/*.{ts,tsx}'], ## 📱 Live Demo
extends: [
// Other configs... Visit: [https://nao-pnm-ui.pages.dev/](https://nao-pnm-ui.pages.dev/)
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM ## 🤖 Claude Commands
reactDom.configs.recommended,
], This project includes helpful Claude commands for development:
languageOptions: {
parserOptions: { ```bash
project: ['./tsconfig.node.json', './tsconfig.app.json'], # start claude in yolo mode
tsconfigRootDir: import.meta.dirname, claude --dangerously-skip-permissions
},
// other options... # pull main changes
}, /sync-main
},
]) # sync branch changes with github
/sync-branch
# create or swap to a branch for development
/swap-branch [new or existing branch name]
# ask claude or team for help if needed
``` ```
## 🔧 Available Scripts
- `bun run dev` - Start development server
- `bun run build` - Build for production
- `bun run preview` - Preview production build
- `bun run lint` - Run ESLint
## 📄 License
This project is open source and available under the [MIT License](LICENSE).

@ -0,0 +1,85 @@
#!/bin/bash
# Personal Network Manager Setup Script
# This script installs Node.js 20 via NVM and Bun package manager
set -e
echo "🚀 Personal Network Manager Setup Script"
echo "=========================================="
# Check if we're on macOS or Linux
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "✓ Detected macOS"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "✓ Detected Linux"
else
echo "❌ This script is designed for macOS and Linux only"
exit 1
fi
# Install NVM
echo ""
echo "📦 Installing NVM (Node Version Manager)..."
if [ -d "$HOME/.nvm" ]; then
echo "✓ NVM directory already exists"
else
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
echo "✓ NVM installed"
fi
# Update ~/.zshrc with NVM configuration
echo ""
echo "🔧 Updating ~/.zshrc with NVM configuration..."
NVM_CONFIG='export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'
# Check if NVM config already exists in ~/.zshrc
if grep -q "NVM_DIR" ~/.zshrc 2>/dev/null; then
echo "✓ NVM configuration already exists in ~/.zshrc"
else
echo "" >> ~/.zshrc
echo "# NVM Configuration" >> ~/.zshrc
echo "$NVM_CONFIG" >> ~/.zshrc
echo "✓ NVM configuration added to ~/.zshrc"
fi
# Source NVM for current session
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install Node.js 20
echo ""
echo "📦 Installing Node.js 20..."
nvm install 20
nvm use 20
nvm alias default 20
echo "✓ Node.js 20 installed and set as default"
# Install Bun
echo ""
echo "📦 Installing Bun..."
if command -v bun &> /dev/null; then
echo "✓ Bun is already installed"
else
curl -fsSL https://bun.sh/install | bash
echo "✓ Bun installed"
fi
# Install project dependencies
echo ""
echo "📦 Installing project dependencies..."
if [ -f "package.json" ]; then
bun install
echo "✓ Dependencies installed"
else
echo "⚠ No package.json found - skipping dependency installation"
fi
echo ""
echo "🎉 Setup complete!"
echo ""
echo "Next steps:"
echo "1. Restart your terminal or run: source ~/.zshrc"
echo "2. Verify installation: node --version && bun --version"
echo "3. Start development: bun run dev"
Loading…
Cancel
Save