Internreport
Internreport
Internreport
1
CONTENTS
Acknowledgement
Chapter 4: Node JS
4.1 Introduction to Node.js
4.2 Node.js HTTP Module: Reading the Query String
Chapter 5: Express JS
5.1 Express JS Http Methods, URL Building
5.2 Express JS – MySQL, Mongo DB
Chapter 6: React JS
6.1 Introduction to React
6.2 Core Concepts of React
6.3 Managing State in React Components and props
6.4 React Lifecycle Methods and Hooks
Chapter 7:Conclusion
Chapter 8:Gallery
2
CHAPTER 1
COMPANY PROFILE
Phoenix Softech, based in Madurai, is a trusted IT solutions provider known for its
wide-ranging services, including website design, web application development,
search engine optimization (SEO), and vehicle tracking systems.
Phoenix Softech’s team of experienced professionals collaborates closely with
clients to understand their goals, providing expertise at every stage, from planning
and design to implementation and support.
Vision
To become a leader in IT solutions by continually advancing technology to
create substantial value for clients.
To empower businesses with customized digital tools that drive growth,
enhance operational efficiency, and provide a competitive advantage in an
evolving marketplace.
To establish Phoenix Softech as a preferred technology partner for
businesses by consistently delivering reliable, innovative solutions.
Mission
To provide high-quality IT solutions that align with each client’s business
goals, delivering expertise in design, development, and strategic digital
solutions.
To deliver tailored services that evolve with the client’s needs, ensuring
long-term reliability and measurable results.
To create collaborative client relationships, emphasizing continual
enhancement of systems and processes to achieve optimal project outcomes.
3
CHAPTER 2
BASICS HTML CONCEPTS
HTML, short for Hypertext Markup Language, is the standard language for
creating and organizing content on web pages. It’s a markup language that defines
the structure of a webpage using elements and tags. Each tag in HTML specifies a
piece of content, such as headings, paragraphs, images, links, or interactive forms,
making it essential for web developers to build and organize content that browsers
can interpret and display.
Document Declaration: Every HTML file starts with <!DOCTYPE html>, which
tells the browser it’s an HTML5 document, the latest standard for web pages.
HTML Root Element: The <html> tag wraps all content on the page, indicating the
start and end of the HTML code.
Head Section (<head>): Contains meta-information like the page’s title, character
set, and links to external resources (e.g., CSS, JavaScript files).
Title (<title>): Sets the page’s title that appears on browser tabs.
Meta Tags: Provide metadata like character encoding (<meta charset="UTF-8">)
and descriptions, which improve SEO.
Body Section (<body>): Contains the main content visible to users, such as text,
images, links, and interactive forms.
4
Key HTML Tags and Their Uses
Headings (<h1> to <h6>): Define page titles and subtitles, with <h1> as the main
heading and <h6> as the smallest.
Paragraphs (<p>): Group blocks of text, creating distinct sections within the
content.
Line Break (<br>): Inserts a line break within text.
Bold and Italic Text:
<strong> and <em> tags convey importance and emphasis, respectively.
<b> and <i> tags also bold or italicize text but without added meaning.
5
Navigation Lists: Organize links within a <nav> tag for easy navigation.
Commonly structured as unordered lists (<ul>) with <li> items.
Lists
HTML supports two main types of lists:
Unordered Lists (<ul>): Displays bullet points; each item is marked with <li>.
Ordered Lists (<ol>): Displays numbered items, with each list item wrapped in an
<li> tag.
Tables
Tables organize content into rows and columns, using:
id: Assigns a unique identifier to elements, useful for linking sections or applying
unique styles.
class: Groups elements for collective styling, useful in CSS.
src and href: Define sources for images, videos, or links.
alt: Provides alternative text for images, improving accessibility.
6
2.4 Forms and User Input
HTML forms enable user interactions, allowing data submission to servers:
<header>: Defines the top section of a page, often containing logos or navigation.
<nav>: Contains navigational links, helping search engines understand site
structure.
<main>: Wraps the main content, distinguishing it from sidebars or footers.
<section>: Groups related content, often used in long articles.
<footer>: Defines the footer, which often includes copyright info, links, and
contact information.
7
CHAPTER 3
BASIC CSS CONCEPTS
3.1Introduction to CSS
CSS, or Cascading Style Sheets, is a language used to style and layout web pages.
While HTML provides the structure of a webpage, CSS handles the visual
appearance, including colors, fonts, layout, and spacing. By separating content
(HTML) from presentation (CSS), CSS allows for greater design flexibility and
efficiency in web development.
Selectors
CSS selectors are used to target HTML elements for styling. Common selectors
include:
Element Selector: Targets all elements of a specific type, e.g., p { color: blue; } for
all <p> tags.
Class Selector: Targets elements with a specific class, using a period (.) before the
class name, e.g., .intro { font-size: 18px; }.
ID Selector: Targets a unique element with an ID, using a hash (#) before the ID,
e.g., #header { background-color: gray; }.
Attribute Selector: Targets elements with a specific attribute, e.g., [type="text"]
{ color: red; } for input fields of type text.
Universal Selector (*): Targets all elements on the page.
Combinator Selectors: Target elements based on their relationships. For example:
Descendant selector (space): div p targets all <p> elements inside <div>.
8
Child selector (>): div > p targets only direct child <p> elements within <div>.
Properties and Values
CSS properties define the styles applied to selected elements, while values specify
the style’s exact characteristics. For example, in color: blue;, color is the property
and blue is the value.
Inline CSS
Inline styles apply directly within an HTML element using the style attribute.
While useful for quick fixes or single-use cases, it’s less efficient for large-scale
styling.
Example: <h1 style="color: green;">Hello World</h1>
Internal CSS
Internal CSS is placed within the <style> tag in the HTML document's <head>.
This is useful for styling a single page with a unique design, but it doesn’t apply
across multiple pages.
html
9
Copy code
<style>
body {
background-color: lightblue;
}
</style>
External CSS
External stylesheets, written in .css files, are linked to the HTML document using
the <link> tag in the <head>. External CSS allows styles to be applied across
multiple pages, improving maintainability and consistency.
Eg:
<link rel="stylesheet" href="styles.css">
Essential CSS Properties
10
text-align: Aligns text within an element (e.g., left, center, right).
text-decoration: Adds effects like underline, overline, or line-through.
CSS provides several advanced selectors that allow for highly specific targeting of
elements within a webpage. These advanced selectors are particularly useful for
efficient styling, allowing developers to create more flexible and powerful designs.
Pseudo-Classes
CSS
a:hover {
color: red;
:focus: Targets an element when it gains focus, often used with form
elements.
11
CSS
input:focus {
border-color: blue;
CSS
li:nth-child(2) {
background-color: yellow;
:first-child and :last-child: Targets the first or last child element within a
parent.
CSS
p:first-child {
font-weight: bold;
Pseudo-Elements
12
Pseudo-elements allow you to style specific parts of an element, such as the first
letter, first line, or content inserted before or after an element.
CSS
h1::before {
color: gold;
CSS
p::after {
color: blue;
13
CSS
p::first-letter {
font-size: 2em;
color: red;
CSS provides multiple techniques for laying out elements on a webpage, each with
its own use cases. These techniques include traditional methods like floats and
positioning, as well as modern methods such as Flexbox and CSS Grid.
Floats
Floats have traditionally been used for layout purposes, such as creating multi-
column designs or aligning images within text. However, with the advent of newer
layout systems like Flexbox and Grid, floats are used less often.
CSS
.left-column {
float: left;
14
width: 50%;
.right-column {
float: left;
width: 50%;
To clear the float, the clear property is often used to prevent elements from floating
next to each other unintentionally:
CSS
.clear {
clear: both;
Positioning
CSS positioning allows for more control over where elements appear on a page.
There are several types of positioning:
Static: The default positioning for all elements, where they appear in the
normal document flow.
15
CSS
.static {
position: static;
CSS
.relative {
position: relative;
top: 20px;
CSS
.absolute {
position: absolute;
top: 50px;
right: 10px;
16
}
CSS
.fixed {
position: fixed;
top: 10px;
left: 10px;
CSS
.sticky {
position: sticky;
top: 0;
17
3.4 Flexbox Layout
Flexbox (Flexible Box Layout) is a modern layout module in CSS that enables
more efficient arrangement of elements within a container. Flexbox is ideal for
building responsive layouts as it adapts to screen sizes and content changes.
Flexbox Properties
CSS
.container {
display: flex;
justify-content: Aligns items along the main axis (horizontally for row-based
layouts).
CSS
.container {
justify-content: center;
18
o flex-start: Aligns items to the start of the container.
o flex-end: Aligns items to the end of the container.
o center: Centers items.
o space-between: Distributes items with space between them.
o space-around: Distributes items with space around them.
align-items: Aligns items along the cross axis (vertically for row-based
layouts).
CSS
.container {
align-items: stretch;
CSS
.container {
19
Common values for flex-direction include:
CSS
.container {
flex-wrap: wrap;
CSS Grid Layout is a powerful two-dimensional layout system that allows you to
design complex layouts with ease. It works with both rows and columns, making it
a perfect choice for creating more intricate grid-based designs.
20
display: grid: Defines the container as a grid container.
CSS
.container {
display: grid;
grid-gap: 10px;
Grid items are automatically placed into the grid according to the specified
columns and rows. You can control their placement using properties like grid-
column and grid-row.
grid-column: Defines where an item should start and end in the horizontal
direction.
CSS
21
.item1 {
grid-row: Defines where an item should start and end in the vertical
direction.
CSS
.item2 {
CSS
.container {
grid-template-areas:
22
}
Grid Layout allows for more flexibility than Flexbox when creating more complex,
multi-dimensional layouts.
CSS provides powerful tools for adding animations and transitions to web
elements. These effects can enhance user experience by providing visual feedback
and improving interactivity.
CSS Transitions
A CSS transition allows you to change property values smoothly (over a specified
duration) when an element is in a different state, such as on hover.
CSS
button {
23
background-color: blue;
button:hover {
background-color: green;
CSS Animations
@keyframes bounce {
0% {
transform: translateY(0);
50% {
transform: translateY(-30px);
24
}
100% {
transform: translateY(0);
.ball {
CHAPTER 4
NODE JS
Node JS Introduction
4.1 Introduction to Node.js
25
JavaScript for both client-side and server-side scripting, improving development
speed and efficiency.
Key Features and Capabilities of Node.js
1. Free and Open Source
Node.js is freely available, which promotes a large community of
contributors who improve and expand its functionality.
2. Cross-Platform Compatibility
Node.js runs on various platforms, including Windows, Linux, Unix, and
macOS, making it highly adaptable for different server environments.
3. Dynamic Page Content Generation
Node.js can dynamically generate web pages by creating, reading, and
manipulating content on the server, allowing for personalized and interactive
user experiences.
4. File Handling
Node.js can create, read, write, delete, and close files on the server, making
it ideal for applications needing to manage content dynamically.
5. Form Data Collection
Node.js can process data submitted from HTML forms, enabling user
interaction features such as registrations, feedback, and orders.
6. Database Interaction
Node.js supports adding, deleting, and modifying data in databases, working
well with SQL databases (e.g., MySQL) and NoSQL databases (e.g.,
MongoDB).
Advantages of Node.js in Web Development
1. Efficient and Scalable
With its non-blocking, asynchronous model, Node.js can handle multiple
26
requests simultaneously, which is essential for high-performance, scalable
applications.
2. Unified Language for Full-Stack Development
Node.js enables developers to use JavaScript on both the client and server
sides, reducing the need for different languages and making development
faster and more cohesive.
3. Large Ecosystem and Community Support
Node.js has a vast ecosystem of libraries in npm (Node Package Manager),
allowing developers to quickly integrate pre-built functionalities.
4. Real-Time Capabilities
Node.js is ideal for real-time applications like chat apps and gaming, thanks
to frameworks like Socket.io, which enables instant, bidirectional
communication between client and server.
5. Microservices and API Development
Node.js is well-suited for APIs and microservices, which improve scalability
and maintainability by allowing different parts of an application to function
independently.
Example: -
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(8080);
27
Introduction to the HTTP Module
The HTTP module in Node.js provides the ability to build basic web servers and
handle requests and responses between clients and servers. This module allows
developers to create a server, handle HTTP requests, and send responses, making it
foundational for building web applications with Node.js.
28
// Create a server
http.createServer(function (req, res) {
// Set response header with status code 200 (OK) and content type as HTML
res.writeHead(200, {'Content-Type': 'text/html'});
CHAPTER 5
EXPRESS JS
29
GET
The GET method requests a representation of the specified resource. Requests
using GET should only retrieve data and should have no other effect.
POST
The POST method requests that the server accept the data enclosed in the request
as a new object/entity of the resource identified by the URI.
ExpressJS - URL Building
We can now define routes, but those are static or fixed. To use the dynamic routes,
we SHOULD provide different types of routes. Using dynamic routes allows us to
pass parameters and process based on them.
Example: -
var express = require('express');
var app = express();
app.get('/things/:name/:id', function(req, res) {
res.send('id: ' + req.params.id + ' and name: ' + req.params.name);
});
app.listen(3000);
30
for MongoDb Database:-
mongoose.connect('mongodb://localhost:27017/ayyappan', {
useNewUrlParser: true, useUnifiedTopology: true,
});
app.get('/customers', async (req, res) => {
try {
const customers = await Customers.find(); res.json(customers);
} catch (error) { console.error(error);
res.status(500).json({ error: 'Internal Server Error' });
}
});
CHAPTER 6
REACT JS
6.1 Introduction to React
What is React?
React is a JavaScript library developed by Facebook for creating dynamic,
component-driven UIs, particularly for single-page applications. It enables
developers to build applications that update dynamically without full-page reloads.
Declarative and Component-Based Philosophy
React’s declarative model and component-based structure make it easy to break
down UIs into manageable, reusable elements, facilitating code reuse, testing, and
maintenance.
31
Installing Node.js and npm
Describe the steps to install Node.js and npm, which are necessary for handling
dependencies and running React applications.
Creating a React Project with create-react-app
Walk through setting up a React project using npx create-react-app. Explain the
folder structure, including src (main application code) and public (public assets).
Running a React App
Cover how to run the server using npm start and explain the development
environment with hot-reloading, which refreshes automatically when files are
saved.
Components
Define Class and Function Components. Discuss how React components
encapsulate code, style, and behavior, making them reusable UI blocks.
Props: Explain props (short for properties) as read-only values passed from parent
to child components.
State: Describe state as a data store for dynamic values within components. Each
component can maintain its state to render data that changes over time.
32
const element = <h1>Hello, {name}!</h1>;
Example Diagram: Visualize how props and state flow between components.
33
Render simple HTML and components within the root element, demonstrating how
the virtual and actual DOM interact.
Example Code:
Explain the useState hook to manage state within function components, showing
how it makes components simpler and more concise.
State Lifecycle and Re-renders
Detail how state updates trigger re-renders, making UIs dynamic and responsive.
Example Code:
function Counter() {
const [count, setCount] = useState(0);
34
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>Click me</button>
</div>
);
}
Props Example:
function Greeting(props) {
return <h1>Hello, {props.name}!</h1>;
}
function App() {
return <Greeting name="Alice" />;
}
35
Lifecycle Methods in Class Components
function Timer() {
useEffect(() => {
console.log('Mounted');
return () => console.log('Unmounted');
}, []);
return <div>Timer Component</div>;
}
36
Example Styling Approaches
Example of inline styling:
const style = { color: 'blue', fontSize: '20px' };
return <h1 style={style}>Styled Text</h1>;
function App() {
return (
<Router>
<nav>
<Link to="/home">Home</Link>
<Link to="/about">About</Link>
</nav>
<Route path="/home" component={Home} />
<Route path="/about" component={About} />
</Router>
);
}
37
CHAPTER 7
CONCLUSION
Through practical projects, interns applied their skills by building complete web
applications, overcoming challenges in user experience, data handling, and server
management. By the end of the internship, participants gained hands-on expertise
in full-stack development and a solid understanding of building, deploying, and
maintaining web applications. This experience equipped interns with industry-
relevant skills and real-world project exposure, preparing them for future roles in
web development.
CHAPTER 8
GALLERY
38
39