Full Stack LAB
Full Stack LAB
Name :
Branch : MCA
Semester : II
Register No :
Certified that this is the bonafide record of work done by the above student in MC25203
FULL STACK WEB DEVLOPMENT LABORATORY during the year 2025-2026.
1
INDEX
AIM:
To design a web form using HTML and validate user inputs such as name, email, address, and
phone number using JavaScript, ensuring that all required fields are properly filled before form
submission.
ALGORITHM:
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Advanced Form Validation</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(to right, #74ebd5, #ACB6E5);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.form-box
{ background:
white; padding:
25px; border-radius:
10px; width: 320px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
text-align: center;
}
input {
width: 90%;
padding: 8px;
margin: 8px 0;
}
.btn {
background: #1e3c72;
color: white;
border: none;
padding: 10px;
width: 100%;
border-radius: 5px;
cursor: pointer;
}
.btn:hover
{ background:
#0f2447;
}
</style>
<script>
function validateForm() {
let name = [Link]["myForm"]["name"].[Link]();
let email = [Link]["myForm"]["email"].[Link]();
let address = [Link]["myForm"]["address"].[Link]();
let phone = [Link]["myForm"]["phone"].[Link]();
// Name validation
if (name === "") {
alert(" Name must be filled out");
return false;
}
// Email validation
if (email === "" || )
{ alert(" Enter a valid email address");
return false;
}
// Address validation
if (address === "") {
alert(" Address cannot be empty");
return false;
}
// Phone validation (10 digits)
if (phone === "" || [Link] !== 10 || isNaN(phone))
{ alert(" Enter a valid 10-digit phone number");
return false;
}
// Success message
alert(
"Form Submitted Successfully!\n\n" +
"Name: " + name + "\n" +
"Email: " + email + "\n" +
"Address: " + address + "\n" +
"Phone: " + phone
);
return true;
}
</script>
</head>
<body>
<div class="form-box">
</form>
</div>
</body>
</html>
OUTPUT :
RESULT :
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]:
EVENT MANAGEMENT SYSTEM
AIM:
To develop a simple Event Management System using HTML, CSS, and JavaScript that
allows users to create events, view available events, and register for events using local
storage.
ALGORITHM:
PROGRAM:
HTML ([Link])
<!DOCTYPE html>
<html>
<head>
<title>Event Management System</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<script src="[Link]"></script>
</body>
</html>
CSS ([Link])
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
text-align: center;
}
h1 {
color: #333;
}
.box {
background: white;
padding: 20px;
margin: 20px auto;
width: 300px;
border-radius: 5px;
}
input {
width: 90%;
padding: 8px;
margin: 5px;
}
button {
padding: 8px 15px;
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
li {
list-style: none;
margin: 10px 0;
}
JavaScript ([Link])
let events = [Link]([Link]("events")) || [];
function addEvent() {
let name = [Link]("eventName").value;
let date = [Link]("eventDate").value;
if (name === "" || date === "") {
alert("Please fill all fields");
return;
}
[Link]({ name, date, registered: 0 });
[Link]("events", [Link](events));
displayEvents();
}
function registerEvent(index)
{ events[index].registered++;
[Link]("events", [Link](events));
displayEvents();
}
function displayEvents() {
let list = [Link]("eventList");
[Link] = "";
displayEvents();
OUTPUT:
RESULT:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]: PERSONAL FINANCE TRACKER
DATE:
AIM:
To develop a Personal Finance Tracker using HTML, CSS, and JavaScript that allows users
to record income and expenses, view transaction details, calculate total balance, and visualize
data using charts.
ALGORITHM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="[Link]
</head>
<body>
<div class="container">
<div class="form-container">
<h2>Add Transaction</h2>
<form id="transactionForm">
<label>Type:</label>
<select id="type">
<option value="Income">Income</option>
<option value="Expense">Expense</option>
</select>
<label>Amount:</label>
<label>Category:</label>
<label>Description (optional):</label>
</form>
</div>
<div class="transactions">
<h2>Transactions</h2>
<table id="transactionTable">
<thead>
<tr>
<th>Date</th>
<th>Type</th>
<th>Category</th>
<th>Amount</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- Summary -->
<div class="summary">
<h2>Summary</h2>
</div>
<div class="charts">
<h2>Charts</h2>
<canvas id="incomeExpenseChart"></canvas>
<canvas id="categoryChart"></canvas>
</div>
</div><script src="[Link]"></script>
</body>
</html>
[Link]
body {
background-color: #f0f2f5;
margin: 0;
padding: 0;
container {
max-width: 900px;
background-color: white;
padding: 20px;
border-radius: 8px;
}
h1, h2 {
form {
display: flex;
flex-direction: column;
margin-bottom: 20px;
form label {
margin-top: 10px;
margin-bottom: 5px;
{ padding: 8px;
font-size: 16px;
}
form button
{ margin-top:
15px;
background-color: #4CAF50;
color: white;
cursor: pointer;
border-radius: 4px;
form button:hover
{ background-color:
#45a049;
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
table, th, td {
th, td {
padding: 8px;
text-align: center;
}
.summary p {
font-size: 18px;
.charts {
margin-top: 20px;
}
canvas {
max-width: 100%;
margin-top: 20px;
}
[Link]
[Link]('transactionForm').addEventListener('submit', function(e) {
[Link]();
[Link](transaction);
updateTable();
updateSummary();
updateCharts();
// Reset form
[Link]();
});
function updateTable() {
[Link] = '';
[Link](t => {
[Link] = `
<td>${[Link]}</td>
<td>${[Link]}</td>
<td>${[Link]}</td>
<td>₹${[Link](2)}</td>
<td>${[Link]}</td>
`;
[Link](row);
});
// Update summary
function updateSummary() {
[Link]('totalIncome').textContent = [Link](2);
[Link]('totalExpense').textContent = [Link](2);
[Link]('balance').textContent = [Link](2);
// Update charts
if (incomeExpenseChart) [Link]();
{ type: 'bar',
data: {
datasets: [{
}]
},
});
});
if (categoryChart) [Link]();
{ type: 'pie',
data: {
labels: [Link](categories),
datasets: [{
data: [Link](categories),
backgroundColor: [
'#FF6384','#36A2EB','#FFCE56','#4BC0C0','#9966FF','#FF9F40'
}]
},
});
}
OUTPUT:
RESULT:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]: LEARNING MANAGEMENT SYSTEM
DATE:
AIM:
To design and develop a simple Learning Management System (LMS) using HTML, CSS,
Bootstrap, and JavaScript that allows users to view courses, enroll in them, and attempt a
basic quiz with instant feedback.
ALGORITHM:
o Create a courses section with multiple course cards and enroll buttons.
o Ensure layout adjusts for different screen sizes using media queries.
8. Verify that:
PROGRAM:
1. [Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="[Link]
rel="stylesheet">
<!-- Custom CSS -->
</head>
<body>
<div class="container">
<span class="navbar-toggler-icon"></span>
</button>
</ul>
</div>
</div>
</nav>
</header>
<div class="col-md-4">
<div class="card-body">
</div>
</div>
</div>
<div class="col-md-4">
<div class="card-body">
<h5 class="card-title">Python Programming</h5>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card-body">
</div>
</div>
</div>
</div>
</section>
<section class="quiz-section">
<div class="quiz-box">
<p>1. What does CSS stand for?</p>
<p id="result"></p>
</div>
</section>
</footer>
<script
src="[Link]
<script src="[Link]"></script>
</body>
</html>
2. [Link]
/* Global Styles */
body {
margin: 0;
padding: 0;
}
/* Hero Section */
.hero {
.quiz-section {
background-color: #f8f9fa;
.quiz-box {
max-width: 500px;
margin: auto;
padding: 20px;
background: white;
border-radius: 8px;
/* Flexbox */
display: flex;
flex-direction: column;
gap: 10px;
}
/* Buttons */
.quiz-box button
{ padding:
10px; border:
none;
background-color: #0d6efd;
color: white;
border-radius: 5px;
/* Box Model */
.card {
padding: 10px;
margin: 5px;
.hero {
padding: 100px;
.quiz-box {
font-size: 18px;
}
}
3 [Link]
function checkAnswer(isCorrect) {
[Link] = "green";
} else {
[Link] = "red";
OUTPUT:
RESULT:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]:
FUNCTION AND CLASS COMPONENT
DATE:
AIM:
To create a ReactJS application using both Function Component and Class Component for
displaying employee information and understanding component-based architecture.
ALGORITHM:
1. Start the program.
2. Import React and Component from the React library.
3. Create a Function Component named EmployeeFunction:
o Use a JavaScript function.
o Return JSX to display employee details like name, designation, and department.
4. Create a Class Component named EmployeeClass:
o Extend it from [Link].
o Use the render() method to return JSX.
o Display employee details inside it.
5. Create the main component App:
o Add headings such as “Full Stack Web Development” and topic name.
6. Include both components inside App:
o Call <EmployeeFunction />
o Call <EmployeeClass />
7. Add simple descriptive text explaining that:
o Function components are simple and easy to use.
o Class components use lifecycle methods and render function.
8. Apply basic styling using center alignment.
9. Export the App component.
10. Run the application to display output in the browser.
11. Stop the program.
PROGRAM:
import React, { Component } from "react";
// Function Component
function EmployeeFunction() {
return (
<div>
<h2>Function Component</h2>
<p>Name: Ramesh</p>
<p>Designation: Web Developer</p>
<p>Department: IT</p>
<hr />
</div>
);
}
// Class Component
class EmployeeClass extends Component {
render() {
return (
<div>
<h2>Class Component</h2>
<p>Name: Kavya</p>
<p>Designation: Software Engineer</p>
<p>Department: CSE</p>
<hr />
</div>
);
}
}
OUTPUT :
RESULT :
Hence, the ReactJS application using Function Component and Class Component was
verified and executed successfully and the desired output was obtained.
[Link]:
APPOINTMENT BOOKING SYSTEM
DATE:
AIM:
To design and develop a simple Clinic Appointment System using HTML, CSS, and
Bootstrap that allows users to book appointments, view upcoming appointments, and manage
scheduling details through a responsive web interface.
ALGORITHM:
3. Include Bootstrap CSS using CDN for styling and responsive design.
PROGRAM:
<!DOCTYPE html>
<head>
<link rel="stylesheet"
href="[Link]
<style>
body {
background-color: #f8f9fa;
.container {
.navbar-brand {
</style>
</head>
<body>
data-target="#navbarNav" aria-controls="navbarNav"
<span class="navbar-toggler-icon"></span>
</button>
</ul>
</div>
</nav>
<div class="container">
<h2>Book an Appointment</h2>
<form>
<div class="form-group">
<option>Dr. Smith</option>
<option>Dr. Johnson</option>
<option>Therapist Emily</option>
</select>
</div>
<div class="form-group">
<label for="appointmentDate">Date</label>
</div>
<div class="form-group">
<label for="appointmentTime">Time</label>
<div class="form-group">
</div>
</form>
</div>
<thead>
<tr>
<th>Date</th>
<th>Time</th>
<th>Professional</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>2026-04-10</td>
<td>10:00 AM</td>
<td>Dr. Smith</td>
<td>Confirmed</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<script src="[Link]
<script
src="[Link]
</body>
</html>
OUTPUT:
RESULT:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]:
ONLINE JOB PORTAL SYSTEM
DATE:
AIM
To develop a simple Job Portal using HTML and JavaScript to post jobs and apply for jobs.
ALGORITHM
1. Start
2. Initialize Variables
o Create an empty list jobs to store job details
o Create an empty list applications to store applicant details
o Set jobIdCounter = 1 to assign unique IDs for each job
3. Get Job Details
o Read job title and company name entered by the user
4. Validate Job Input
o Check whether job title and company name are empty
o If any field is empty, display an error message and stop this process
5. Create and Store Job
o Create a job object containing id, title, and company
o Add the job object to the jobs list
o Increment jobIdCounter by 1 for the next job
6. Display Job List
o Clear previous job display
o Traverse through jobs list
o Display each job with its title, company, and unique job ID
7. Get Application Details
o Read applicant name and job ID entered by the user
8. Validate Application
o Check if applicant name is empty
o Check if entered job ID exists in the jobs list
o If any condition is invalid, display an error message and stop this process
9. Store Application
o Create an application object with name and jobId
o Add the application to the applications list
10. Display Applications and End
11. End
PROGRAM
HTML ([Link])
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Job Portal</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
input, button { margin: 5px 0; padding: 5px; }
.job-card { border: 1px solid #ccc; padding: 10px; margin: 10px 0; }
</style>
</head>
<body>
<h1>Job Portal</h1>
<h2>Post a Job</h2>
<input type="text" id="jobTitle" placeholder="Job Title">
<input type="text" id="jobCompany" placeholder="Company">
<button id="postJobBtn">Post Job</button>
<h2>Available Jobs</h2>
<div id="jobList"></div>
<h3>Applications</h3>
<div id="applications"></div>
<script src="[Link]"></script>
</body>
</html>
JavaScript ([Link])
// DOM elements
const jobListDiv = [Link]('jobList');
const applicationsDiv = [Link]('applications');
// Post Job
[Link]('postJobBtn').addEventListener('click', () =>
{ const title = [Link]('jobTitle').[Link]();
const company = [Link]('jobCompany').[Link]();
if (!title || !company) {
alert("Please fill in both fields");
return;
}
const job = { id: jobIdCounter++, title, company };
[Link](job);
displayJobs();
[Link]('jobTitle').value = '';
[Link]('jobCompany').value = '';
});
// Display Jobs
const displayJobs = () =>
{ [Link] = '';
[Link](job => {
[Link] += `<div class="job-card">
<strong>${[Link]}</strong> at <em>${[Link]}</em> (ID: ${[Link]})
</div>`;
});
};
// Display Applications
const displayApplications = () =>
{ [Link] =
''; [Link](app => {
const job = [Link](j => [Link] === [Link]);
[Link] += `<div>${[Link]} applied for ${[Link]} at
${[Link]}</div>`;
});
};
OUTPUT:
RESULTS:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]:
AIM
To develop a simple Support Ticket System using HTML and JavaScript to raise, view, and
close tickets.
ALGORITHM
1. Start
2. Design the Web Page
Create an HTML page with input fields to enter user name and issue description
Add a button labeled “Raise Ticket”
Provide a section to display the list of raised tickets
Allow the user to type their name and describe the issue in the given input fields
When the user clicks “Raise Ticket”, read the entered name and issue from the input
fields
5. Validate Inputs
6. Create Ticket
10. End
PROGRAM
HTML ([Link])
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Support Ticket System</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
input, textarea, button { margin: 5px 0; padding: 5px; width: 100%; }
.ticket-card { border: 1px solid #ccc; padding: 10px; margin: 10px 0; }
</style>
</head>
<body>
<h1>Support Ticket System</h1>
<h2>Raise a Ticket</h2>
<input type="text" id="userName" placeholder="Your Name">
<textarea id="issueDesc" placeholder="Describe your issue"></textarea>
<button id="raiseTicketBtn">Raise Ticket</button>
<h2>Tickets</h2>
<div id="ticketList"></div>
<script src="[Link]"></script>
</body>
</html>
JavaScript ([Link])
// Raise Ticket
[Link]('raiseTicketBtn').addEventListener('click', () => {
const name = [Link]('userName').[Link]();
const desc = [Link]('issueDesc').[Link]();
if (!name || !desc) {
alert("Please fill in all fields");
return;
}
const ticket = { id: ticketIdCounter++, name, desc, status: 'Open' };
[Link](ticket);
displayTickets();
[Link]('userName').value = '';
[Link]('issueDesc').value = '';
});
// Display Tickets
const displayTickets = () =>
{ [Link] = '';
[Link](ticket => {
[Link] += `<div class="ticket-card">
<strong>Ticket #${[Link]}</strong> by ${[Link]}<br>
${[Link]}<br>
<em>Status: ${[Link]}</em>
<button onclick="closeTicket(${[Link]})">Close</button>
</div>`;
});
};
// Close Ticket
const closeTicket = (id) => {
const ticket = [Link](t => [Link] === id);
if (ticket) {
[Link] = 'Closed';
displayTickets();
}
};
OUTPUT:
RESULTS:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]: CRUD OPERATIONS USING MYSQL AND
[Link]
DATE:
AIM:
To performing CRUD (Create, Read, Update, Delete) operations using MySQL and [Link].
ALGORITHM:
express for web server (though not used for routing here).
mysql2 for MySQL database connectivity.
Host
User
Password
Database name
6. Define a book object (user) with properties: title, author_id, genre, price, and published_date.
7. Insert the user object into the books table using INSERT INTO ... SET ?.
8. If insert is successful:
PROGRAM:
Const express = require('express');
const db =
[Link]({ host:
"localhost",
user: "root",
password: "viimsmcalab",
database: "bookstore"
});
[Link]((err)=>
{ if (err)
{throw err; }
[Link]("MySQL Connected");
});
// SELECT Query
[Link](rows);
});
// Insert Query
const user =
{ title:
"Bigdata",
author_id: 5,
genre: "subject",
price: 100,
published_date: "2008-05-23"
};
[Link]('INSERT INTO books SET ?', user, (err, results) =>
{ if (err) {
[Link]('An error occurred while inserting data');
throw err;
[Link]('Data inserted:',[Link]);
});
// Update query
const booksupdate =
{ title: "FSWD",
author_id: 8,
genre: "subject",
price: 500,
published_date: "2010-05-23"
};
{ if (err) {
throw err;
});
// Delete query
if (err) {
throw err;
if ([Link] > 0) {
[Link]('Record deleted successfully');
} else {
});
// Close DB Connection
[Link]((err)=> {
if (err)
{throw err; }
});
MySQL Commands
RESULT:
Hence, the program has been verified and executed successfully and the desired output is
obtained.
[Link]:
ONLINE DONATION / FUND RAISING SYSTEM
DATE:
AIM
To develop a Donation Web Application using HTML, [Link], Express, and MongoDB to store
and display donor details.
ALGORITHM
1. Start
o Begin the execution of the donation application.
2. Initialize Server
o Create a [Link] server using Express and enable CORS and JSON parsing.
3. Connect to Database
o Use Mongoose to connect to MongoDB database donationDB and ensure
connection.
4. Define Schema and Model
o Create a schema with name and amount, and define the Donation model.
5. Design Frontend Page
o Create HTML page with input fields for name and amount, a Donate button, and
display section.
6. Collect and Validate Input
o When user clicks Donate, read values and ensure inputs are not empty.
7. Send Data to Server
o Send the data using POST request (/donate) in JSON format.
8. Store Data in Database
o Server receives data, creates a donation object, and saves it in MongoDB.
9. Fetch and Display Data
o Use GET request (/donations) to retrieve all records and display them
dynamically.
10. End
PROGRAM
[Link]
[Link](cors());
[Link]([Link]());
// MongoDB connect
[Link]("mongodb://[Link]:27017/donationDB");
[Link]("connected", () =>
});
// Schema
amount: Number
});
// Add donation
await [Link]();
});
[Link](data);
});
[Link]
!DOCTYPE html>
<html>
<head>
<title>Donation App</title>
</head>
<body>
<h2>Donation App</h2>
<br><br>
<br><br>
<button onclick="donate()">Donate</button>
<h3>Donors</h3>
<ul id="list"></ul>
<script>
await fetch("[Link]
{ method: "POST",
headers: {
"Content-Type": "application/json"
},
body:
[Link]({ name:
name,
amount: Number(amount)
})
});
loadData();
[Link](d => {
const li = [Link]("li");
[Link](li);
});
loadData();
</script>
</body>
</html>
OUTPUT:
TERMINAL:
RESULTS:
Hence, the program has been verified and executed successfully and the desired output is
obtained.