Skip to content

Latest commit

 

History

History
194 lines (152 loc) · 3.14 KB

File metadata and controls

194 lines (152 loc) · 3.14 KB

Useful Commands

Development

Start Development Server

cd frontend-project
npm run dev

Access at: http://localhost:5173

Build for Production

cd frontend-project
npm run build

Output: frontend-project/dist/

Preview Production Build

cd frontend-project
npm run preview

Lint Code

cd frontend-project
npm run lint

Deployment

Automatic Deployment (Recommended)

Deployment happens automatically via GitHub Actions when you push to main:

git push origin main

What happens:

  1. GitHub Actions workflow triggers on push to main
  2. Builds the frontend project (npm ci && npm run build)
  3. Uploads build artifact to GitHub Pages
  4. Deploys to production automatically

Monitor deployment: https://github.com/devfreddy/devfreddy.github.io/actions

Git Workflows

Check Repository Status

git status

View Recent Commits

git log --oneline -10

Create Feature Branch

git checkout -b feature/feature-name

Stage and Commit Changes

git add .
git commit -m "Description of changes"

Push to Remote

git push origin main

Project Management

View Project Structure

tree -I 'node_modules|dist|.git' -L 3

Find Files by Pattern

find . -name "*.jsx" -not -path "./node_modules/*"

Search Code

grep -r "searchTerm" --include="*.jsx" --include="*.js"

Node/NPM

Install Dependencies

cd frontend-project
npm install

Check for Outdated Packages

npm outdated

Update Package

npm update package-name

Check Node Version (Volta)

node --version
# Should show 24.4.1 (from volta config in package.json)

Troubleshooting

Clear Node Modules and Reinstall

cd frontend-project
rm -rf node_modules package-lock.json
npm install

Clear Vite Cache

cd frontend-project
rm -rf node_modules/.vite
npm run dev

Check Build Output

cd frontend-project
npm run build
ls -la dist/

SDLC Workflow

Start a Session

Initialize context for a new work session:

In Claude Code, use the /start slash command:

/start

What it does:

  1. Reviews recent session work and next steps
  2. Checks active features and sprint priorities
  3. Identifies any blockers
  4. Suggests starting point for today

Wrap Up a Session

Complete session documentation and commit changes:

In Claude Code, use the /wrap slash command:

/wrap

What it does:

  1. Updates session wrap-up documentation
  2. Updates COMMANDS.md, TROUBLESHOOTING.md if needed
  3. Updates ROADMAP.md and feature docs
  4. Commits all documentation changes
  5. Provides session summary

Create New Feature

Set up documentation structure for a new feature:

In Claude Code, use the /new-feature slash command:

/new-feature

What it does:

  1. Creates feature directory with all documentation files
  2. Updates feature index
  3. Provides template structure for documentation

Documentation

View Session History

ls -lt docs/sessions/

View Feature Documentation

ls -la docs/features/