Simple Web App Development Tech Stack
Stack Components
- Use vanilla HTML
- Use JavaScript - Access external libraries as needed.
- Use SQLite for database actions.
- Use Node.js for server actions.
- Use Git/GitHub for version control.
Project Structure
Project
├── package.json
├── package-lock.json
├── public
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── database.db
└── server.js
Testing will be done locally on an Ubuntu laptop using Firefox or Chrome. Files will be edited using VSCode.
Git Setup Guide
Step 1: Install Git
sudo apt update
sudo apt install git
Verify installation:
git --version
Step 2: Configure Git
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Step 3: Initialize Git in Your Project Directory
cd /path/to/your/project
git init
Step 4: Create a .gitignore File
Add a .gitignore file to prevent unwanted files from being committed.
Example:
node_modules/
*.log
database.db
.env
Add and commit:
touch .gitignore
git add .gitignore
git commit -m "Add .gitignore"
Step 5: Create a New Repository on GitHub
- Create a new repository on GitHub.
- Copy the repository URL (HTTPS or SSH).
Step 6: Connect Local Repo to GitHub
git remote add origin https://github.com/your-username/your-repo.git
Step 7: First Commit and Push
git add .
git commit -m "Initial commit"
git push -u origin master
Step 8: Git Workflow
Check status:
git statusStage changes:
git add <file>Commit changes:
git commit -m "Commit message"Push changes:
git push
Branching
Create a new branch:
git checkout -b new-feature-branchMerge branch:
git checkout master git merge new-feature-branch git pushPull updates:
git pull
This guide helps set up a simple web app development environment using Node.js, SQLite, Git, and GitHub.