Welcome to the Full Stack Web Development Course! This starter repository contains the essential setup instructions, starter files, and tools you need to configure your computer, connect to GitHub, and run your first Flask & PostgreSQL backend.
- Required Tools & Download Links
- Step-by-Step Machine Installation (Windows & macOS)
- Git & GitHub Setup (Local-First Workflow)
- Step-by-Step Personal Access Token (PAT) Guide
- Python & Flask Backend Setup (
venv) - Common Errors & Student Troubleshooting Cheat Sheet
Before starting class, complete the required action for each tool below:
| Tool | Purpose | Action / What to Do | Official Download Link |
|---|---|---|---|
| VS Code | Code Editor | Download & install (ensure "Add to PATH" is checked) | Download VS Code |
| Git | Version Control System | Download & run the installer with default settings | Download Git |
| PostgreSQL | Relational Database Engine | Download & install (postgres password) |
Download PostgreSQL |
| pgAdmin 4 | PostgreSQL GUI Client | Download & install to visually view tables and queries | Download pgAdmin |
| Python (3.9+) | Backend Runtime | Download & install (ensure "Add Python to PATH" is checked) | Download Python |
| GitHub | Code Hosting Platform | Create a free account and verify your email address | Sign Up for GitHub |
| Render | Cloud Backend & Database Host | Create a free account (choose "Sign in with GitHub") | Sign Up for Render |
| Vercel | Cloud Frontend Host | Create a free account (choose "Continue with GitHub") | Sign Up for Vercel |
- macOS: Download the
.zipfile ➔ DragVisual Studio Code.appinto/Applications.- Important: Open VS Code, press
Cmd + Shift + P, typeShell Command: Install 'code' command in PATH, and hit Enter.
- Important: Open VS Code, press
- Windows: Run the
.exeinstaller.- Important: During installation, ensure you check the box:
[x] Add to PATH (requires shell restart)[x] Add "Open with Code" action to Windows Explorer context menu
- Important: During installation, ensure you check the box:
- macOS: Open Terminal and run:
If not installed, macOS will prompt you to install Xcode Command Line Tools. Click Install.
git --version
- Windows: Run the Git installer. Choose default options, ensuring:
- Default editor: Visual Studio Code.
- Adjusting your PATH: "Git from the command line and also from 3rd-party software".
- Run the PostgreSQL installer (default port is
5432). ⚠️ Write down yourpostgrespassword during installation (you will need this to connect your backend).- Open pgAdmin 4 ➔ Connect with your password ➔ Right-click Databases ➔ Create Database ➔ Name it
notes_db.
💡 Why Local-First? We build our project files locally on our computer first, track changes using local Git, and then connect our project to an empty GitHub repository.
Run these commands once in your terminal (macOS Terminal / Windows Git Bash or PowerShell):
git config --global user.name "Your GitHub Username"
git config --global user.email "your-registered-github-email@example.com"
git config --global init.defaultBranch main
# Verify your settings
git config --listNavigate to your project directory and run:
# 1. Initialize local git repository
git init
# 2. Check untracked files
git status
# 3. Stage all files
git add .
# 4. Create your first commit
git commit -m "Initial commit: project setup"
# 5. Ensure branch is main
git branch -M main- Log into GitHub.
- Click the
+icon in the top right ➔ select New repository. - Repository name:
notes-app(or your project name). ⚠️ DO NOT check any of these boxes:[ ] Add a README file[ ] Add .gitignore[ ] Choose a license(Your repository MUST be completely empty with 0 commits so there are no merge conflicts).
- Click Create repository.
⚠️ Why do I need a Token instead of my Password? GitHub no longer allows pushing code via terminal using your account password. You must generate a Personal Access Token (Classic) which acts as your secure CLI password.
- Click your Profile Picture (top-right of GitHub) ➔ Settings.
- In the left sidebar, scroll to the bottom ➔ click Developer settings.
- Click Personal access tokens ➔ select Tokens (classic).
- Click Generate new token ➔ select Generate new token (classic).
- Set token details:
- Note:
My-Local-VSCode-Token - Expiration:
30 days(or90 days). - Select scopes: Check the
[x] repobox (gives full permission to push to your repositories).
- Note:
- Click the green Generate token button at the bottom.
- COPY YOUR TOKEN NOW:
- Copy the token starting with
ghp_.... - Paste it in a safe notepad temporarily. GitHub will never display this token again once you leave the page!
- Copy the token starting with
# Replace with your actual token, username, and repo name
git remote add origin https://<YOUR_PAT_TOKEN>@github.com/<YOUR_GITHUB_USERNAME>/<APP_NAME>.git
# Example:
# git remote add origin https://ghp_abcdef1234567890@github.com/john_doe/notes-app.git
# Push your code
git push -u origin maingit remote add origin https://github.com/<YOUR_GITHUB_USERNAME>/<APP_NAME>.git
git push -u origin mainWhen prompted in terminal:
- Username: Enter your GitHub username.
- Password: Paste your Personal Access Token (
ghp_...). (Note: Characters will not show while pasting; simply paste and hit Enter).
mkdir backend && cd backendpython -m venv venv- On macOS / Linux:
source venv/bin/activate - On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
- On Windows (Command Prompt):
.\venv\Scripts\activate.bat
(When activated, your terminal prompt will show (venv) at the beginning).
Make sure you have requirements.txt in your backend folder:
pip install -r requirements.txtCreate a file named .env in your backend/ directory:
DATABASE_URL=postgresql://postgres:your_password@localhost:5432/notes_db
ALLOWED_HOSTS=*(Replace your_password with the password you set during PostgreSQL installation).
python app.pyOpen your browser and visit: http://127.0.0.1:5000/api/hello to verify your server is running!
- Error:
.\venv\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. - Fix: Open Windows PowerShell as Administrator and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Error:
remote origin already exists- Fix:
git remote remove origin git remote add origin https://<YOUR_PAT_TOKEN>@github.com/<YOUR_USERNAME>/notes-app.git git push -u origin main
- Fix:
- Error (macOS Keychain): macOS remembers an old expired password.
- Fix: Open Spotlight (
Cmd + Space) ➔ search Keychain Access ➔ search forgithub.com➔ delete the saved entry ➔ re-rungit push.
- Fix: Open Spotlight (
- Error (Windows Credential Manager): Windows uses wrong saved credentials.
- Fix: Search Windows for Credential Manager ➔ Windows Credentials ➔ under Generic Credentials, find
git:https://github.com➔ click Edit and paste your new PAT.
- Fix: Search Windows for Credential Manager ➔ Windows Credentials ➔ under Generic Credentials, find
- Error:
OSError: [Errno 48] Address already in use: 5000 - Fix (macOS):
lsof -ti:5000 | xargs kill -9
- Fix (Windows):
netstat -ano | findstr :5000 taskkill /PID <PID_NUMBER> /F
- Error:
psycopg.OperationalError: connection to server at "localhost", port 5432 failed - Fix: Make sure PostgreSQL is running on your machine:
- macOS:
brew services start postgresql - Windows: Open
services.msc➔ findpostgresql-x64➔ right-click and select Start.
- macOS: