This repository contains the source code for the Specter website, built with React, Express, and Vite.
The website is automatically deployed to Netlify, which provides preview deployments for every pull request, allowing you to see your changes live before they're merged.
Before you begin, make sure you have the following installed on your system:
- Node.js (version 18 or higher)
- npm (comes with Node.js)
- Git
- GitHub account (for contributing)
- Download Node.js: Visit nodejs.org and download the LTS version
- Install Node.js: Follow the installation instructions for your operating system
- Verify installation: Open a terminal and run:
node --version npm --version
If you're new to Git, here are some helpful resources:
Since you won't have direct push access to the main repository, you'll need to fork it first:
- Go to the Specter Website repository on GitHub
- Click the "Fork" button in the top-right corner
- Select your GitHub account as the destination for the fork
- Wait for GitHub to create your fork
-
Clone your forked repository (replace
YOUR_USERNAME
with your GitHub username):git clone git@github.com:YOUR_USERNAME/specter-website.git
Or using HTTPS:
git clone https://github.com/YOUR_USERNAME/specter-website.git
-
Navigate to the project directory:
cd specter-website
This allows you to keep your fork synchronized with the original repository:
git remote add upstream https://github.com/cryptoadvance/specter-website.git
Verify your remotes:
git remote -v
You should see:
origin
pointing to your forkupstream
pointing to the original repository
Install the project dependencies using npm:
npm install
Start the development server:
npm run dev
The website will be available at http://127.0.0.1:3000
(or the port shown in your terminal).
Before making any changes, always sync your fork with the original repository:
# Switch to main branch
git checkout main
# Pull latest changes from upstream
git pull upstream main
# Push updates to your fork
git push origin main
Create a new branch for your work:
git checkout -b feature/your-feature-name
Or for bug fixes:
git checkout -b fix/your-bug-fix-name
- Edit files using your preferred code editor
- The development server will automatically reload when you save changes
- Test your changes in the browser
-
Check what files have changed:
git status
-
Add files to staging:
git add .
Or add specific files:
git add path/to/your/file.js
-
Commit your changes with a descriptive message:
git commit -m "Add: brief description of your changes"
Push your branch to your forked repository:
git push origin feature/your-feature-name
- Go to your fork on GitHub (
https://github.com/YOUR_USERNAME/specter-website
) - Click "Compare & pull request" button that appears after pushing
- Make sure the base repository is
cryptoadvance/specter-website
and base branch ismain
- Make sure the head repository is your fork and compare branch is your feature branch
- Fill out the pull request:
- Title: Brief description of your changes
- Description: Detailed explanation of what you changed and why
- Click "Create pull request"
Once you create a pull request, Netlify will automatically create a preview deployment:
- π Automatic Build: Netlify builds your changes automatically
- π Preview Link: You'll get a unique preview URL to test your changes
- β Status Checks: The PR will show whether the build succeeded or failed
- π Live Preview: Share the preview link with others for feedback
Look for the Netlify bot comment in your PR with links like:
- Deploy Preview:
https://deploy-preview-123--specter-website.netlify.app
- Build Logs: Link to see detailed build information
This allows you to verify that your changes work correctly before they're merged into the main website!
npm run dev
- Start development servernpm run build
- Build the project for productionnpm start
- Start the production servernpm run check
- Run TypeScript type checkingnpm run db:push
- Push database schema changes (if applicable)
specter-website/
βββ client/ # Frontend React application
βββ server/ # Backend Express server
βββ shared/ # Shared utilities and types
βββ dist/ # Built files (generated)
βββ node_modules/ # Dependencies (generated)
βββ package.json # Project configuration and dependencies
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.ts # Tailwind CSS configuration
- Hot Reload: The development server automatically reloads when you make changes
- TypeScript: This project uses TypeScript for type safety
- Tailwind CSS: Styling is done with Tailwind CSS utility classes
- Keep Your Fork Updated: Regularly sync with upstream to avoid conflicts
- Netlify Previews: Every PR gets a live preview - use it to test your changes!
Modern AI tools can significantly speed up your development workflow. Here are some recommended tools:
Augment is an AI-powered coding assistant that provides intelligent code completion and suggestions:
- Installation: Available as a VS Code extension
- Features:
- Context-aware code completion
- Intelligent refactoring suggestions
- Code explanation and documentation
- Bug detection and fixes
- Benefits: Particularly helpful for React, TypeScript, and modern web development
- Usage: Works seamlessly with this project's tech stack
VS Code is the recommended editor for this project, enhanced with AI capabilities:
- Augment: AI-powered code completion and assistance
- GitHub Copilot: AI pair programmer (requires subscription)
- Tabnine: AI code completion
- IntelliCode: Microsoft's AI-assisted development
# Install VS Code extensions via command line
code --install-extension augmentcode.augment
code --install-extension ms-vscode.vscode-typescript-next
code --install-extension bradlc.vscode-tailwindcss
- Code Generation: Use AI to generate boilerplate components and functions
- Code Review: Ask AI to review your code for potential issues
- Documentation: Generate comments and documentation automatically
- Debugging: Get AI suggestions for fixing errors and warnings
- Learning: Ask AI to explain unfamiliar code patterns or concepts
- Review AI suggestions: Always understand and review AI-generated code
- Test thoroughly: AI-generated code should be tested like any other code
- Learn from suggestions: Use AI as a learning tool to improve your skills
- Maintain code quality: Ensure AI suggestions follow the project's coding standards
- Ask for explanations: Don't just accept suggestions - understand why they work
- "Create a React component for displaying user profiles with TypeScript"
- "Add Tailwind CSS styling to make this component responsive"
- "Explain this TypeScript error and suggest a fix"
- "Generate unit tests for this React component"
- "Optimize this code for better performance"
Remember: AI tools are assistants, not replacements for understanding the code you're writing!
- Issues: Report bugs or request features in GitHub Issues
- Discussions: Ask questions in GitHub Discussions
- Documentation: Check existing documentation in the repository
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch from
main
- Keep your fork synced with upstream
- Make your changes with clear, descriptive commits
- Test your changes thoroughly
- Push to your fork and submit a pull request
- Respond to feedback during the review process
# Sync your fork with upstream
git checkout main
git pull upstream main
git push origin main
# Create and switch to new branch
git checkout -b new-feature-name
# Check current branch and status
git status
# View commit history
git log --oneline
# Push your branch to your fork
git push origin branch-name
# Delete a branch after PR is merged
git branch -d branch-name
git push origin --delete branch-name
- Never push directly to main: Always work in feature branches
- Keep PRs focused: One feature or fix per pull request
- Sync regularly: Keep your fork updated to avoid merge conflicts
- Test locally first: Use
npm run dev
to test your changes locally - Use Netlify previews: Check the preview deployment link in your PR to verify everything works
- Wait for build status: Make sure the Netlify build passes before requesting review
Remember: You're working with a fork, so you'll push to origin
(your fork) and create pull requests to upstream
(the original repository)!