CSS makes the difference between ugly and beautiful. Every professional website you use is styled with CSS.
What is JavaScript?
Makes pages interactive: clicks, animations, data
Clicks, form validation, loading data, dynamic updates — all JavaScript.
// When the button is clicked, show a message
document.querySelector('button')
.addEventListener('click', () => {
alert('You clicked the button!');
});
JavaScript is the only programming language browsers understand. HTML and CSS are markup/styling — JS is the real programming language of the web.
The Modern Web Stack
From basics to powerful frameworks
Frameworks = tools that make building faster
Writing everything from scratch is slow and error-prone. Frameworks like Next.js, React, and Vue give you building blocks so you can focus on your features, not plumbing.
What is Next.js?
The framework we will use to build our app
Server-Side Rendering
Pages load faster because the server prepares the HTML before sending it to the browser
API Routes Built-In
Build your backend inside the same project — no separate server needed
Built by Vercel, based on React — used by Netflix, TikTok, Notion, and thousands of companies worldwide.
What is Node.js?
JavaScript outside the browser
# Check if Node.js is installed
node --version # Should show v20.x or higher
# Check npm (comes with Node.js)
npm --version # Should show 10.x or higher
Your Task
What is a Coding Agent?
An AI that writes code based on your instructions in natural language
What it IS
A very fast assistant who types code for you
Great at repetitive tasks and boilerplate
Knows many programming languages
Available 24/7, never gets tired
What it is NOT
Not magic — it makes mistakes
Needs clear human direction
Cannot understand your business context alone
Must be reviewed and tested
Introduction to Antigravity
Your AI-powered coding environment in the browser
Creates Files
Generates entire components, pages, and configurations
Writes Code
Implements features from plain English descriptions
Fixes Errors
Debugs and resolves issues you encounter
Explains Things
Helps you understand any code or concept
Setting Up Antigravity
Already familiar from yesterday — now we use its full power
Quick Setup (5 min)
What Antigravity Can Do
Write and edit code with AI assistance
Run your project with live preview
Connect to GitHub to save your code
Deploy to the cloud
How to Use the AI
Type your request in the AI chat bar
Be specific about what you want
The AI generates code in your project
Review the result in the live preview
Demo: Scaffolding with Antigravity
LIVE DEMO — Teacher demonstrates
Example Prompt
"Create a Next.js project called study-planner
with a homepage showing a welcome message
and a navigation bar with links to Home and Tasks."
Watch the AI interaction and the result. Notice how it asks clarifying questions, creates multiple files, and explains what each one does.
Understanding the Project Structure
A Next.js project has a clear, predictable organization
layout.tsx wraps every page. Put your navigation bar and footer here — they appear on every page automatically.
Running Your App
From code to browser in two commands
Hot Reload — Every save = instant update in the browser!
Change a file, save it, and the browser updates automatically. No need to refresh manually. This makes development fast and fun.
Open http://localhost:3000 in your browser. If you see your welcome message — congratulations, you are running a web app!
Localhost vs. The Cloud
Why you need to deploy your app
As you learned yesterday: "The cloud" = someone else's computer, always on. Instead of running your app on your laptop, a server in a data center runs it for you — day and night.
What is Vercel?
The easiest way to deploy your app to the cloud
Made by Next.js Creators
Same company that builds Next.js — best hosting for it
Free for Students
No credit card needed. Perfect for projects.
Auto-Redeploys on Push
Push code → Vercel automatically redeploys
Deploying to Vercel
From code on your computer to a live website in 4 steps
Deployment Steps
Your app is live! You get a URL like https://study-planner-abc123.vercel.app — share it with anyone in the world!
What is a Database?
Where your app stores data permanently
▦
SQL
Tables with rows and columns (like Excel)
▦
NoSQL
Flexible documents (like JSON files)
▦
JSON Files
The simplest option — perfect for learning!
This week: We use JSON files as our database. Simple, readable, and perfect to learn the concept. Real production apps use SQL or NoSQL databases.
JSON as a Simple Database
JSON = JavaScript Object Notation — a text file that stores structured data
JSON is readable by humans AND computers. You can open it in any text editor and understand it instantly. The app reads this file and turns it into the cards you see on screen.
Reading JSON in Next.js
API Routes = server-side code in Next.js
// src/app/api/tasks/route.ts
import { readFileSync } from 'fs';
export async function GET() {
const data = readFileSync('data/tasks.json', 'utf-8');
return Response.json(JSON.parse(data));
}
Create a file = create an API.app/api/tasks/route.ts becomes /api/tasks. Same file-based routing magic as pages!
Building Features with Antigravity
A simple 4-step strategy for every feature
Example prompt for a feature
"I'm working on GitHub issue #3: Create Task List Page.
Based on my Figma design, build a page at /tasks that shows
all tasks from data/tasks.json as cards with title, due date,
priority badge, and a completion checkbox."
One issue at a time. Don't try to build everything at once. Complete one feature, test it, close the issue, then move to the next.
Demo: Adding Task Creation
LIVE DEMO — Teacher demonstrates
Prompt for Antigravity
Create a form at src/app/tasks/new/page.tsx with fields
for title, due date, and priority (low/medium/high).
On submit, POST to /api/tasks which appends to tasks.json.
Redirect to /tasks after successful creation.
Demo: Adding Task List
LIVE DEMO — Teacher demonstrates
Prompt Antigravity to create a task list page
Fetch data from /api/tasks
Display tasks as styled cards
Iterate: improve styling, add filters
Prompt: "Fetch from /api/tasks and display as cards"
Show title, due date, priority badge, and completion checkbox for each task.
Iterative development: build, test, improve. The first version is never perfect. Each prompt refines the result — better styling, more features, fewer bugs. This is how real development works.
Closing GitHub Issues
Track your progress by closing completed work
When a Feature is Done
Go to your GitHub repository
Open the issue you completed
Add a comment describing what was done
Click "Close issue"
Why It Matters
Keeps your project organized
Shows progress to your team and teacher
Creates a history of what was built and when
Professional habit used in every company
Goal for today: Close at least 2 GitHub issues with comments describing the work completed.
Addendum: What is Authentication?
Knowing who is using your app
Authentication
Who are you? Verify identity via email/password, Google, etc.
Authorization
What can you do? Control who can read, write, or delete data
Session
Stay logged in A token stored in the browser remembers you
Multi-User
Shared but personal Each user sees their own data in a shared space
Why does this matter? Without authentication, every visitor is anonymous. You cannot save personal data or restrict who changes what.
Firebase: Your Backend in Minutes
Google's platform for building apps without managing servers
Real-time NoSQL database. Data syncs across all connected clients instantly. Organized in collections and documents (like folders and files).
Free Tier
Generous free plan: 50K auth users/month, 1GB Firestore storage, 50K reads/day. More than enough for learning and small projects.
Why Firebase? Building your own auth system is complex and error-prone. Firebase handles password hashing, token management, and security — so you focus on your app.
How Firebase Auth Works
The sign-in flow in 4 steps
Firestore: Real-Time Data
A database that syncs across all users instantly
Multi-User: How It All Connects
Auth + Firestore = shared but personal
1. Sign In
Each student signs in with their email. Firebase gives them a unique user.uid.
2. Write Events
When a user adds an event, it is saved with their userId attached. This is the ownership tag.
3. Read All Events
Every user sees all events in the school. The calendar shows everyone's schedule.
4. Edit Own Only
Users can only modify or delete events where userId === currentUser.uid. Others are read-only.
Key principle: Authentication answers "who is this user?" — Authorization answers "what can this user do?" You need both for a multi-user app.
Today's Deliverables
By the end of today, you should have all 6 completed
1
App Running Locally npm run dev works at localhost:3000
This exercise uses the Firebase concepts covered in the addendum slides. Multiple users sign in, share a weekly calendar, and see real-time updates from classmates.
Day 2 Complete!
What You Learned Today
✓ How the web works (HTTP, client/server)
✓ HTML, CSS, JavaScript fundamentals
✓ Next.js — file-based routing and API routes
✓ Antigravity — AI-driven development
✓ Vercel — one-click deployment
✓ JSON files as a simple database
✓ Firebase Auth & Firestore — multi-user real-time apps
✓ The complete build → test → deploy cycle
Days 3-4: YOUR OWN project! You and your partner will design, build, and deploy your own application from scratch. Day 5: Demo Day — present your creation to the class!