Alok yada 1221609
Alok yada 1221609
Alok yada 1221609
ON
Tranzy
Submitted By:
A LO K (1 2 2 16 0 9 )
B A T C H : 2 0 2 1-25
To
I,A L O K he re b y d e c la re th a t th e tra in in g r e p or t e n t it le d ( “ Fu ll S t a c k ” ) ha s n o t
p re se n t e d a s a p a rt o f a n y o t h er a c a d e m ic w o rk t o g e t m y d e g re e o r c e rt if ic a t e
e xc e p t JM IT R a d a u r f o r t h e f u lfillm e n t o f t he re qu ire m e n t fo r t he d e gr ee o f
B a c h e lo r
IN F O R M A TIO N T E C H N O L O G Y .
I
Acknowledgement
A p a r t f ro m th e e f fo rt s o f m e , th e su c c e ss o f m y p ro je c t d e p e n d s o n th e
e n c o u ra ge m e n t a n d g u id e lin e s o f m a n y o th e rs. I t a k e t h is o p p o rt u n it y t o
e xp re ss m y g ra t itu d e to th e p e o p le w h o ha ve be e n in st ru m e n t a l in th e
c o m p le t io n o f t h e p ro je c t .
B u t n isk i I c a n n o t s a y t ha n k y o u e n o u gh f o r t he ir t re m e n d o u s su p p o rt a n d he lp . I
m a te r ia liz e d .
f o r c o n c e p tu a l u n d e rst a n d in g o f t e c h n o lo g ie s a n d p ro je c t .
ALOK
12 2 1609
II
III
COMPANY INFORMATION
H op in g M in d s is a f o rw a rd -t hin k in g t ra in in g a n d d ev e lo p m e n t o rg a n iz a t io n
d e d ic a te d t o b rid gin g t he g a p be t w e e n e d u c a tio n a n d in d u str y d e m a n d s. Th e y
p ro vid e ta ilo re d p ro g ra m s in fie ld s lik e d a t a sc ie n c e , d igit a l m a rk e tin g ,
so ft w a re d e v e lo p m e n t , a n d b u sin e ss a n a ly t ic s. Th e se c o u rse s fo c u s o n p ra c t ic a l,
ha n d s-o n le a rn in g , gu id e d b y e xp e rien c ed m e n t o rs t o e n su re st u d e n ts g a in
jo b -re a d y sk ills.
Th e p la tf o rm a lso e m p ha size s c a r e er se rv ic e s, in c lu d in g re su m e b u ild in g,
in t e rv ie w p re p a r a t io n , a n d jo b p la c e m e n t a ssist a n c e . B y fo st e rin g sk ill
e n ha n c e m e n t a n d p ro f e ssio n a l gro w t h, H o p in g M in d s a im s t o e m p o w e r
in d iv id u a ls f o r lo n g -te rm c a re e r su c c e ss. V isit h o p in g m in d s.c o m fo r m o r e d e t a ils.
IV
TABLE OF CONTENT
D e c la ra t io n … ..............................................................................................................i
A c k n o w le d ge m e n t … ................................................................................................. ii
C e rt ific a t e … ...............................................................................................................iii - iv
Ta ble of C o n t e n ts … .................................................................................................. v - v i
L ist o f F ig u re s.............................................................................................................vii
Chapter 1 H t m l
1.1 H t m l....................................................................................................................1 -2
1.3 H tm l Fo r m a t t in g ................................................................................................ 4 -5
1.4 A n c ho r, im a ge a n d t a b le … ............................................................................ 5 -6
Chapter 2 C SS
2 .1 C SS .................................................................................................................. 9 -1 4
2 .2 C SS P a d d in g................................................................................................. 14 -15
2 .4 N a v ig a t io n b a r a n d ra d io b u tt o n … ............................................................. 16 -1 7
V
2 .5 C SS a n im a t io n … ...........................................................................................1 8
Chapter 3 Ja va Sc rip t
3 .3 Ja va Sc rip t op e r a t o r p r ec ed e n c e ...............................................................2 1
3 .5 Ja va Sc rip t f u n c t io n s… ................................................................................ 2 2
3 .7 Ja va Sc r ip t lo o p s..................................................................................... 2 2 -2 3
4 .2 B u tt o n , gr id , t a b le...........................................................................................2 5 -2 6
Chapter 5 R e a c t Js
5 .1 In t ro d u c tio n … .................................................................................................3 0
5.3 K e y Fe a tu r e s...................................................................................................3 1
5.4 C o re c o n c e p t s.................................................................................................3 1
5 .5 A d va n ta ge s A n d L im it a t io n s.................................................................... 3 1-3 2
5 .6 R e a c t E c o sy st e m ...........................................................................................3 2
VI
Chapter 6 M o n g o D B
6.1 In t ro d u c t ion t o M o n g o D B … … … … … … … … … … … … … … … … … … … … … 3 9
6.2 A d v a n t a g e s o f M o n g o D B … … … … … … … … … … … … … … … … … … … … ..3 9
6.4 D a t a M od e lin g in M o n g o D B … … … … … … … … … … … … … … … … … … 3 9 -4 0
6.5 A g gre g a t io n F ra m e w o r k … … … … … … … … … … … … … … … … … … … … … 4 0
Chapter 7 N o d e JS
7 .1 In t ro d u c t io n t o N o d e .js … … … … … … … … … … … … … … … … … … … … … ...4 1
7 .2 A d v a n t a g e s o f N od e .js … … … … … … … … … … … … … … … … … … … … … ...4 1
7 .3 C o re C o n c e p t s … … … … … … … … … … … … … … … … … … … … … … … … … .4 1
7 .4 B u ild in g R E S Tf u l A P Is … … … … … … … … … … … … … … … … … … … … … … 4 1
7 .6 In t e gra tio n w it h M o n go D B … … … … … … … … … … … … … … … … … … … … .4 2
8 .2 B a c k g ro u n d … ................................................................................................. 4 4
8 .4 P u rp o se ............................................................................................................4 4
8 .5 S c o p e ......................................................................................................... 4 4 -4 5
F e a t u re s a n d fu n c t io n a lity ............................................................................ 4 5
M o d u le s… .......................................................................................................4 6
VII
Chapter 9 C o n c lu sio n … ................................................................................................. 4 9
Chapter 10 Sc re e n sh o t s.................................................................................................5 0 -5 3
VIII
CHAPTER-1
HTML
H T M L is a n a c ro n y m w h ic h sta n d s f o r H y p e r Te xt M a rk u p L a n g ua ge w hic h is u se d
fo r c re a t in g w e b p a g e s a n d w e b a p p lic a t io n s. L e t 's se e w h a t is m e a n t b y H y p e rt e xt
M a rk u p L a n g u a g e , a n d W e b p a g e .
ha ve c lic k e d o n a hy p e rt e xt . H y p e r T e xt is a w a y t o lin k t w o o r m o re w eb p a g e s
(H TM L d o c u m e n t s) w ith e a c h o t he r.
Markup language: A m a r k u p la n gu a ge is a c o m p u t e r la n gu a g e th a t is u se d t o
a p p ly la y o u t a n d fo rm a t tin g c o n ve n t io n s t o a te xt d o c u m e n t . M a rk u p la n g u a g e
etc.
W e b p a ge c a n be o f t he st a t ic o r d y n a m ic t y p e . W it h t he he lp o f H TM L o n ly , w e c a n
fo rm a t o n a w e b bro w se r. A n H TM L do c u m e n t is m a d e o f m a n y H TM L t a g s a n d
1
• Te xt e d ito rs a re th e p ro gra m s w hic h a llo w e d itin g in a w rit te n t e xt, h e n c e to c re a te a w e b
p a g e w e n e e d t o w rit e o u r c o d e in so m e t e xt e d it o r.
a b e gin n e r, t he be st te xt e d ito r is N o t e p a d ( W in d o w s) o r T e xt E d it ( M a c ).
HTML Tags
a n H T M L c o n t e n t a n d a sim p le c o n t e n t . H TM L ta gs c o n t a in t h re e m a in p a rts:
o p en in g t a g, c o n t e n t a n d c lo sin g t a g . B u t so m e H T M L t a g s a re u n c lo se d t a g s.
W h e n a w e b br ow se r re a d s a n H TM L d o c u m e n t , br ow se r re a d s it fro m to p t o b o tt o m
a n d le f t to rig h t. H T M L ta gs a re u se d to c re a t e H T M L d o c u m e n ts a n d re n d e r t he ir
p ro p e rtie s.
E a c h H T M L t a g s h a v e d if f e re n t p ro p e rt ie s.
be t w e en a sim p le t e xt a n d H TM L t ex t. Y o u c a n u se a s m a n y ta gs y o u w a n t a s p e r
E ve ry t a g in H TM L p er fo rm d if fe re n t ta sk s.
(e xc e p t so m e ta gs)
Syntax
2
<p > P a ra gra p h T a g < /p >
A n H TM L file is m a d e o f e le m e n t s. T he se e le m e n t s a re r e sp o n sib le f o r c re a t in g
c o n te n t be t w e en t he m .
HTML Attribute
H T M L a tt ribu t e s a re sp e c ia l w o rd s w h ic h p ro v id e a d d it io n a l in f o rm a t io n a b ou t t he
e le m e n t s o ra t t rib u t e s a re th e m o d if ie r o f t he H TM L e le m e n t .
E a c h e le m e n t o r t a g c a n h a v e a t trib u te s, w h ic h d e f in e s t h e b e ha vio r o f t ha t
Th e A t trib u te s n a m e a n d va lu e s a re c a se se n sitiv e, a n d it is re c o m m e n d e d b y W 3 C t ha t it
sho u ld be w ritt e n in L o w e r c a se o n ly .
3
1.3 HTML Formatting
H T M L Fo rm a t tin g is a p ro c e ss o f f o rm a tt in g t e xt f o r b et t e r lo o k a n d f e e l. H T M L
Th e re a re a lm o st 1 4 o p tio n s a v a ila b le t ha t ho w t e xt a p pe a rs in H T M L a n d X H T M L .
In H T M L t he f o rm a t t in g ta gs a re d iv id e d in to t w o c a te g o rie s:
• P h y sic a l ta g: Th e se ta gs a r e u se d t o p ro v id e t he v is ua l a p p e a ra n c e t o th e te xt .
< tt > Th is t a g is u se d to a p p e a r a t e xt in te le ty pe . ( n o t
su p p o rte d
in H T M L 5 )
4
se c tio n o f t e xt . ( N ot su p p o rt ed in H T M L 5)
Th e H T M L a n c h o r ta g d e f in e s a h y p e rlin k t ha t lin k s o n e p a ge t o a n o t he r pa ge . It
c a n c re a t e h y p e rlin k t o o t he r w e b p a ge a s w e ll a s f ile s, lo c a t io n , o r a n y U R L . T he
to d e st in a tio n p a g e o r U R L .
p o in t s o u tt he d e st in a t io n p a g e .
Th e sy n t a x o f H T M L a n c ho r t a g is g iv e n be lo w .
HTML Image
H T M L im g t a g is u se d t o d isp la y im a ge o n th e w e b pa ge . H T M L im g t a g is a n e m p t y t a g
a n e xa m p le o f H TM L im a g e .
5
HTML Table
H T M L ta ble t a g is u se d t o d isp la y d a t a in t a b u la r f o rm ( ro w * c o lu m n ). T he re c a n
be m a n y c o lu m n s in a ro w . W e c a n c re a t e a t a b le to d isp la y d a t a in ta bu la r f or m ,
<t d >, a n d
<t h> e le m e n t s.
H T M L ta ble s a re us ed to m a n a g e t he la y o u t o f th e p a g e e .g., h e a d e r se c t io n ,
n a v ig a t io n ba r, b o d y c o n t e n t, fo o t e r se c t io n e tc . B u t it is re c o m m e n d e d t o u se d iv
ta g o ve r t a b le t o m a n a ge t he la y o u t o f th e p a g e .
HTML Lists
it e m s st a rt w it h < li> t a g
6
In H TM L U n o rd e re d list, a ll th e list it e m s a re m a rk e d w it h b u lle t s. It is a lso k n o w n
w it h t he < li> t a g .
e n c y c lo p e d ia . T he d e f in it io n list is v e ry a p p r op r ia te w h e n y o u w a n t to p re se n t
c o n ta in s f o llo w in g t hre e t a g s:
<d t > t a g d e f in e s a te rm .
Note: We create a list inside another list, which will be termed as nested List.
HTML Form
A n H TM L f o rm is a s ec tio n o f a d o c u m e n t w h ic h c o n t a in s c o n t ro ls su c h a s t e xt fie ld s,
p a ssw o rd f ie ld s, c h e c k b o xe s, ra d io bu t to n s, su b m it b u tt o n , m e n u s e tc .
A n H T M L fo rm fa c ilit a t e s th e u se r t o e n te r d a t a t ha t is t o b e se n t t o t he se r ve r f o r
7
Why use HTML Form
Fo r e xa m p le : I f a u se r w a n t t o p u rc h a se so m e it e m s o n in t e rn e t, h e /sh e m u st f ill
be se n t t o th e g ive n a d d re ss.
2. // in p u t c o n t ro ls e .g . t e xtf ie ld , t e xt a re a , ra d io bu t t o n , bu t to n
3. < /f o rm >
a t trib u te o f in pu t e le m e n t c a n be v a r io u s t y p e s, w h ic h d e fin e s in fo r m a t io n
type= Description
""
te xt D e f in e s a o n e -lin e t e xt in p u t f ie ld .
su bm it D e f in e s a su b m it b u tt o n to su bm it th e fo rm t o
se rve r.
re se t D e f in es a r e se t bu t t o n t o re se t a ll va lu e s in
th e fo rm .
ra d io D e f in e s a ra d io bu t to n w hic h a llo w s se le c t o n e
o p tio n .
8
f ile D e f in e s t o se le c t t he file fro m d e v ic e st o ra g e .
im a g e D e f in e s a gra p hic a l su bm it bu t to n .
C la ss A tt ribu t e in H T M L
Th e H T M L c la ss a tt ribu t e is u se d t o sp e c if y a sin g le o r m u lt ip le c la ss n a m e s fo r
a n H T M L e le m e n t. T he c la ss n a m e c a n b e u se d by C S S a n d Ja v a S c rip t to d o so m e
ta sk s fo r H TM L e le m e n t s. Y o u c a n u se th is c la ss in C S S w it h a sp e c if ic c la ss, w rite
In a n H TM L d o c u m e n t, Advantages of HTML
C om p a t ib ilit y . ...
9
CHAPTER-2
CSS
C a sc a d in g S ty le Sh e e ts ( C S S) is a st y le sh e e t la n g u a g e u se d f o r sp e c if y in g th e
p re se n t a t io n a n d st y lin g of a d o c u m e n t w rit te n in a m a rk up la n g u a g e su c h a s
H TM L o r X M L ( in c lu d in g X M L d ia le c t s su c h a s SV G , M a th M L o r X H T M L ) .
2.1 CSS
• C S S d e sc ribe s h o w H T M L e le m e n ts a re to be d isp la y e d o n sc r e en , pa p e r, o r in o t he r m ed ia
• C S S sa ve s a lo t o f w o rk . It c a n c o n t ro l th e la y o u t o f m ult iple w e b p a g e s a ll a to n c e
• E xt e rn a l sty le sh e et s a re st o re d in C SS f ile s.
C SS is u se d to d e f in e st y le s fo r y o u r w e b p a g e s, in c lu d in g t he d e sig n , la y o u t a n d
10
CSS Solved a Big Problem
H T M L w a s N E V E R in te n d e d to c o n ta in t a gs f o r f o rm a t t in g a w e b p a g e ! H TM L w a s c re a te d
to d e sc rib e t he c o n t e n t o f a w e b p a g e , lik e :
sp e c if ic a t ion , it st a r te d a n ig h tm a re f o r w e b d e v e lo p e rs. D e v e lo p m en t o f la rg e
C o n so rt iu m ( W 3 C ) c re a t e d C S S.C SS re m o v e d th e st y le f or m a t t in g f ro m t he H T M L
p a g e!
CSS Syntax
Th e se le c t o r p o in t s to t he H TM L e le m e n t y o u w a n t t o sty le .
1. In lin e C SS
2. In t e rn a l C S S
3. E xt e rn a l C SS CSS Selector
11
C SS se le c t o rs a re u se d to se le c t t he c o n t e n t y o u w a n t t o st y le . Se le c t o rs a re th e
p a rt o f C S S ru le se t . C SS se le c t o rs se le c t H TM L e le m e n t s a c c o rd in g t o it s id ,
c la ss, t y p e , a t trib u te e t c .
Th e re a re se ve ra l d if fe re n t ty p e s o f se le c t o rs in C S S.
1. C S S E le m e n t S e le c t o r
Th e e le m e n t se le c t o r se le c t s th e H T M L e le m e n t by n a m e .
2. C S S Id Se le c t o r
id se lec to r se le c t s th e id a t trib u te o f a n H TM L e le m e n t t o se le c t a sp e c if ic e le m e n t . A n id
It is w rit t e n w it h t he ha sh c h a ra c te r ( # ), f o llo w e d by t he id o f th e e le m e n t.
Th e c la ss se le c t o r se le c ts H T M L e le m e n t s w it h a sp e c ific c la ss a tt ribu t e . It is u se d w it h a
p e rio d c h a ra c t er . ( Fu ll st o p sy m b o l) fo llow e d b y t h e c la ss n a m e .
3. C S S U n ive rsa l S e le c t o r
Inline CSS
W e c a n a p p ly C SS in a sin gle e le m en t by in lin e C S S t e c hn iq u e.
Syntax:
1. < ht m l t a g st y le = "c ssp ro p e rt y 1 :v a lu e ; c ssp ro p e rt y 2 :v a lu e ;"> < /h tm lt a g >E xa m p le :
12
2. < h2 st y le = "c olo r: re d ; m a rgin -le f t :4 0 p x;"> In lin e C SS is a p p lie d o n t his he a d in g . < / h2 >
t his a s a n e n d o f y o u r st y le v a lu e .
• Th e se sty le s c a n n o t be re u se d a n y w h e re e lse .
• In lin e C SS d o e s n o t p r ov id e b ro w se r c a c h e a d va n t a g es .
Internal CSS
External CSS
Th e e xt e rn a l st y le sh e e t is g e n e ra lly u se d w h e n y o u w a n t t o m a k e c h a n g e s o n m u lt ip le
E xa m p le :
1. <head>
13
2. <link re l= "sty le sh e e t" ty p e = "t e xt/ C S S" hre f = "m y st y le .c ss">
3. </head>
Th e e xt e rn a l st y le sh e et m a y b e w r it t e n in a n y t e xt e d ito r b u t m u st be sa v e d w it h a .c ss
la te rd a te . C o m m e n ts a re ig n o re d by bro w se rs.
CSS Colors
Y o u c a n se t t h e b a c k gro u n d c o lo r f o r H TM L e le m e n t s:
H e llo W o rld
C SS Te xt C o lo r
Y o u c a n se t t h e c o lo r o f b o rd e rs:
14
<h 1 st y le = "b o rd e r:2 p x so lid To m a t o ;">H e llo W o rld </ h1 >
CSS Margins
Th e C S S m a rg in p ro p e rt ie s a re u se d to c re a t e sp a c e a ro u n d ele m e n t s, o ut sid e o f
a n d le f t ).
m a rg in - it is u se d to se t le f t m a rgin o f a n e le m e n t .
le f t
m a rg in - It is u se d t o se t righ t m a rgin o f a n e le m e n t .
rig ht
m a rgin - t o p It is u se d t o se t to p m a rgin o f a n e le m e n t .
15
2.2 CSS Padding
Th e C SS p a d d in g pr o p er tie s a re u se d t o ge n e ra te sp a c e a ro u n d a n e le m e n t 's c o n t e n t ,
W it h C SS , y o u ha ve f u ll c o n t ro l o ve r t he p a d d in g . Th e re a re p ro p e rt ie s fo r se t t in g t he
p a d d in gf o re a c h sid e o f a n e le m e n t (t o p , righ t , bo t to m , a n d le f t ).
In C SS , t he te r m "b o x m o d e l" is u se d w he n t a lk in g a bo u t d es ig n a n d la y o u t.
c o n sist s o f: m a rgin s, bo r de r s, p a d d in g, a n d t he a c tu a l c o n t e n t. Th e im a ge be lo w
illu stra t es t he b o x m o d e l:
E xp la n a t io n o f th e d if fe re n t p a rt s:
• Content - T he c o n t e n t o f th e b o x, w he re t e xt a n d im a ge s a p p e a r
• Padding - C le a rs a n a re a a ro u n d t h e c o n t e n t. T he p a d d in g is tra n sp a re n t
• Border - A b o rd e r th a t go e s a ro u n d t he p a d din g a n d c o n te n t
16
How To Add Icons
Fo n t A w e so m e .A d d th e n a m e o f t h e sp e c if ie d ic o n c la ss to a n y in lin e H TM L e le m en t
C SS ( siz e ,c o lo r, sha d o w , e tc .)
Styling Links
{c o lo r: h o t p in k ;}
lin k s st a t e sa r e :
• a : v isit e d - a lin k th e u se r h a s v is it e d
• a : h o ve r - a lin k w h e n t h e u se r m o v se s o ve r it
CSS Lists
17
• Se t d iff e re n t list ite m m a rk e rs fo r u n o rd e re d list s
• Se t a n im a g e a s t he list it e m m a rk e r
In H TM L , w e u se t he bu t to n ta g to c re a t e a bu t t o n , b u t by u sin g C SS p ro p e rt ie s, w e
c a n st y le th e b u tt o n s. B u tt o n s h e lp u s to c re a te u se r in te ra c tio n a n d e ve n t
p ro c e ssin g . T he y a re o n e o f t he w id e ly u se d e le m e n t s o f w eb p a g es . D u rin g th e
a c c e ssin g in fo r m a t io n . It is t he U I e le m e n t o n a w e b pa ge t ha t in c lu d e s lin k s fo r
th e o t h e r se c t io n s o f t he w e bsit e .
A n a v ig a t io n ba r is m o st ly d isp la y e d o n t h e to p o f t he p a ge in t he f o rm o f a
a lw a y s be p la c e d be f o re th e m a in c o n te n t o f t he w e bp a ge .
to p o f t he p a ge .
18
CSS Radio Button
Th e ra d io bu t to n is a n H T M L e le m e n t t ha t h e lp s t o t a k e in p u t fro m th e u se r.
A lt ho u g h it is h a rd to st y le t he ra d io b u tt o n , p se u d o -e le m e n t s m a k e it e a sie r t o
ta sk , w h ic h w ill p ro v id e a n e w lo o k t o th e de f a ult ra d io bu t to n .
ha ve t o w rit e th e C SS .
C SS A n im a t io n p ro p e rty is u se d t o c re a t e a n im a tio n o n t he w e b p a g e. I t c a n be u se d a s a
re p la c e m e n t o f a n im a tio n c re a t e d by F la sh a n d Ja v a S c rip t.
C SS 3 @ k e y f ra m e s R u le
A n a n im a t io n m a k e s a n e le m e n t c h a n g e g ra d ua lly f ro m o n e st y le to a n o t he r. Y o u
c a n a d d a s m a n y a s p ro p e rt ie s y o u w a n t to a d d . Y o u c a n a lso sp e c ify th e c ha n ge s
in p e rc e n t a g e .0 % sp e c if y t h e st a r t o f t he a n im a t io n a n d 1 0 0 % s pe c if y it s c o m p le tio n .
19
CSS Solved a Big Problem
H T M L w a s N E V E R in t en d e d to c o n ta in t a g s f o r f o rm a tt in g a w e b p a ge ! H TM L w a s c re a te d
sp e c if ic a t ion , it st a rt e d a n ig ht m a re fo r w e b d e ve lo p e rs. D e ve lo p m e n t o f la r ge
be c a m e a lo n g a n d e xp e n siv e p ro c e ss .
E ve ry H TM L e le m e n t ha s a d e fa u lt d isp la y va lu e d e p e n d in g o n w h a t ty p e o f e le m e n t it is .
Th e d e f a u lt d isp la y v a lu e f o r m o st e le m e n t s is b lo c k o r in lin e .
CHAPTER-3
JAVASCRIPT
20
L a n g u a ge . Ja v a S c ript is t h e p ro g ra m m in g la n g ua ge o f th e W e b . Ja v a S c rip t is e a sy to le a rn .
<sc rip t > d o c u m e n t.g e tE le m e n t B y Id ("d e m o ").in n e r HTML = "M y F ir stJa v a S c rip t";
JavaScript Programs
p ro gra m s a re e xe c u t e d b y th e w e b bro w se r.
JavaScript Syntax
// H o w to c re a te v a ria b le s: v a r x; le ty ;
// H ow to u se
va ria ble s: x = 5; y = 6;
le t z = x + y ;
21
Th e re a re so m e ru le s w h ile d e c la rin g a Ja v a S c rip t va ria b le ( a lso k n o w n a s id e n tif ie rs) .
2. A f te r f irs t le tt e r w e c a n us e d igit s (0 t o 9 ) , f o r e xa m p le v a lu e 1 .
o bje c t. It c a n b e a c c e sse d f ro m a n y f u n c t io n .
ty p e s o f d a t a t y p e s in Ja va Sc r ip t .
1. P r im it ive d a t a t y p e
2. N o n -p r im it ive (r e fe re n c e ) d a t a ty pe
he re t o sp e c if y t he d a ta ty p e . It c a n ho ld a n y ty p e o f v a lu e s su c h a s n u m b e rs,
strin g s e t c . Fo r e xa m p le :
1. v a r a = 4 0 ;// ho ld in g n u m be r
I. A rith m e t ic o p e ra to rs a n d o p e ra to r P re c e d e n c e
22
O p e ra D e sc rip tio n
tor
+ A d d it io n
- Su b t ra c t io n
* M u lt ip lic a tio n
** E xp o n e n t ia tio n ( ES 2 0 1 6)
/ D ivisio n
% M o d u lu s ( R e m a in d e r )
++ In c re m e n t
-- D e c re m e n t
Arithmetic Operations
le t x = 1 0 0 + 50 ;
O p e ra t o r pr e c e d en c e d e sc ribe s th e o rd e r in w hic h o p e ra t io n s a re p e rf o rm e d in a n
a rit hm e t ic e xp re ssio n .
M u lt ip lic a t io n ( *) a n d d ivisio n ( /) ha ve h ig he r p re c e d e n c e Th e n a d d it io n ( +) a n d
su bt ra c t io n ( -).
23
O bje c t s a re v a r ia ble s t o o. B u t o bje c t s c a n c o n t a in m a n y v a lu e s. Th is c o d e a ssign s m a n y
Use Arrays?
A n a rra y c a n h o ld m a n y v a lu e s u n de r a sin g le n a m e, a n d y ou c a n a c c e ss t h e v a lu e s b y
re fe rr in g to a n in d e x n u m be r .
// F u n c tio n t o c o m p u t e th e p ro d u c t o f p 1 a n d p 2 f u n c t io n m y F u n c tio n (p 1 , p 2 ) { r e tu rn p 1
* p2;
w a y st o c r e a t e st rin g in Ja va Sc rip t
24
1. B y str in g lit e ra l
2. B y str in g ob je c t ( u sin g n e w k e y w o rd )
C o n d itio n a l St a t e m e n t s a n d L o o p s C o n d itio n a l St a t e m e n t s
w e h a v e t h e f o llo w in g c o n d itio n a l st a t e m e n t s:
L o o ps a re ha n d y , if y o u w a n t t o ru n t he sa m e c o d e o ve r a n d ov e r a ga in , e a c h t im e w it h a
d if f e re n tv a lu e . O ft e n th is is t he c a se w he n w o rk in g w it h a rra y s.
Th e re a re fo u r t y p e s o f lo o ps in Ja va Sc r ip t .
1. f o r lo o p
2. w hile lo o p
3. d o -w hile lo o p
4. f o r-in lo o p
JavaScript Switch
Th e Ja v a S c rip t sw it c h sta te m en t is u se d to e xe c u te o n e c o d e f ro m m u lt ip le
c ha ra c t e rs e tc .
25
Type Conversion and Essential set MethodsJavaScript Type Conversion
Ja va Sc rip t v a r ia ble s c a n be c o n v e rte d t o a n e w v a ria b le a n d a n o t he r d a t a t y p e :
• B y th e u se o f a Ja v a Sc rip t fu n c t io n
A n e xc e p t io n s ig n if ie s th e p re se n c e o f a n a bn o rm a l c o n dit io n w h ic h re q uire s
sp e c ia liz e d p ro g ra m m in g c o n st ru c ts f o r it s e xe c u tio n .
ha ndling the a b norm al sta tem ent s in th e co de and execu t ing them . It
26
exce ption. Th u s, w ith the help of exception ha ndling, it an In except io n
ha ndling
A t hr ow st a t e m e n t is u se d to ra ise a n e xc e p t io n . It m e a n s w he n a n a bn o rm a l c o n d it io n
o c c u rs, a n e xc e p t io n is th ro w n u sin g th ro w .
Ja va Sc rip t t ry … c a tc h
A t ry … c a tc h is a c o m m o n ly u se d st a t e m e n t in va riou s p ro g ra m m in g la n gu a ge s.
c o d e f o r a ll p o ssible e rro rs it m a y c o n t a in , th e n it im p le m e n ts a c t io n s t o t a c k le
th o se e rro rs ( if o c c u r ). A g o o d p ro gra m m in g a p p ro a c h is t o k e e p t he c om p le x c od e
CHAPTER-4
BOOTSTRAP
• B o o tst ra p is t he m o st p o p u la r H T M L , C SS a n d Ja v a Sc r ip t f ra m e w o rk fo r d e ve lo p in g
• It is a bso lu te ly fr ee t o d ow n lo a d a n d u se .
27
• It is a f ro n t -e n d f ra m e w o rk u se d f o r e a sie r a n d f a st e r w e b d e ve lo p m e n t .
th e d if f e re n t b u tt o n sty le s:
• .bt n -d e fa u lt
• .bt n -p rim a ry
• .bt n -su c c e ss
• .bt n -in f o
• .bt n -w a rn in g
• .bt n -d a n g e r
• .bt n -lin k
GRID
A g rid is a st ru c t ur e ( u su a lly tw o -d im e n sio n a l) m a d e u p o f a se rie s o f in te r se c tin g
e ff e c tiv e m e th o d to c re a t e a
28
Bootstrap Tables
Bootstrap Forms
In B o o t st ra p , t he re a re t h re e t y p e s o f f o rm la y o u t s:
• V e rt ic a l f o rm ( th is is d e fa u lt )
• H o rizo n t a l fo rm
• In lin e f o rm
• B o o tst ra p F o rm R u le s
• Th e re a re t hre e st a n d a rd r ule s f o r t h e se 3 f o rm la y o u t s:
a sso ciated w ith the s pecific link . Ba d ges a re u sed to hig h ligh t new o r unread item s. Th e
29
Bootstrap Labels
B o o t st ra p la b e ls a re us ed t o sp e c if y t he a d d it io n a l in f o rm a t io n a bo u t so m e t hin g
d isp la y t he la b e ls.
Bootstrap Panels
In B o o t str a p , a p a n e l is a bo rd e re d bo x w it h so m e p a d d in g a ro u n d it s e le m en t . T he p a n e l
c o m p o n e n tsa re u se d w h e n y o u w a n t t o p u t y o u r D O M c o m p o n e n t in a b o x.
be u se d t o a p p ly so m e sim p le st y le t o th e im a g e s.
o fp ro g re ss ba rs.
bo o t stra p .
30
Bootstrap Dropdowns
be m a d e in t er a c t iv e w it h t he d ro p d o w n Ja va Sc rip t plu g in .
Y o u ha ve to w ra p d ro p d o w n m e n u w ith in t he c la ss .d ro p d o w n
to c re a te B o o tst ra p D ro p d o w n
Th e c la ss ".list -gro u p " w it hin t he < u l> e le m e n t a n d t he c la ss ".list -g ro u p -it e m " w ith in t he
• .a le rt -su c c e ss
• .a le rt -in f o
• .a le rt -w a rn in g
• .a le rt -d a n ge r
31
Bootstrap Wells
In B o o t st ra p , w e lls a re u se d to a d d a ro u n d e d bo rd e r a r o un d a n e le m e n t w it h a gra y
ba c k g ro u n d c o lo ra n d so m e p a d d in g . I t is lik e a c o n t a in e r t ha t d isp la y s th e c o n t e n t .
Bootstrap Collapse
Bootstrap Pagination
P a g in a t io n is u se d t o so rt t he w e b p a g e s o f y o u r w e b site in a n o r ga n iz e d
m a n n e r. It b e c o m e sve r y n e c e ssa ry if y o u r w e bsit e h a s a lo t o f w e b p a g e s.
Fo llo w in g is a list o f c la sse s t ha t B o o t stra p p ro vid e s to ha n d le p a gin a t io n
Class Description
.p a g in a t io n A d d t his c la ss to g e t t he p a g in a t io n o n y o u r p a g e .
.p a g in a t io n sm
Using Sass
32
W hile B o o t st ra p is b u ilt o n L e ss, it a lso h a s a n o f f ic ia l S a ss p o rt. W e m a in t a in it in a
se p a ra t e G itH u b re p o sit o ry a n d ha n d le u p d a t e s w it h a c o n ve rsio n sc rip t.
What's included
S in c e t he Sa ss p o rt h a s a se p a ra t e r e po a n d se rv e s a slig ht ly d if f e re n t a u d ie n c e , t he
c o n t e n ts o f th e p ro je c t d if f er g re a t ly fro m t he m a in B o o t str a p p ro je c t . Th is e n su re s t he
S a ssp o rt is a s c o m p a t ib le w ith a s m a n y S a ss-b a se d sy st e m s a s p o ssible
CHAPTER-5
React JS
d u e t o it s e ff ic ie n c y a n d f le xibilit y .
33
• React w as d esig ned to so lv e the ch alleng es of b u ild ing d yna mic, d a ta-d riv en u ser interfa ces
efficiently.
1 . Component-Based Architecture:
o Rea ct applica tio ns are bu ilt u sing s ma ll, reu sab le co m po nents tha t encapsu late U I lo gic and
rend ering.
2 . Virtual DOM:
o Rea ct u ses a lig htw eigh t in-m emo ry representatio n o f th e a ctua l DO M , ca lled th e V irtua l
4 . Declarative UI:
o D ev elo pers desc rib e h o w th e UI sh o uld lo o k , a nd React h and les u pd ates au to m atically wh en
34
• Functional Components: Lig h tw eig ht a nd u se Reac t ho o k s fo r s ta te and lifecy cle.
fu n ct io n G r e et in g () { r et ur n
• Sh o rt fo r "pro perties."
• E xam ple:
fu n ct io n W e lco m e (p r op s) { re tu r n
• E xam ple:
co n st [c ou n t, se tC o un t ] = u se S ta te (0 );
35
• Fo r class co mpo nents, Reac t pro vides meth o ds like co m p on e n tD id M o u n t and
co m p o n e n tW il lU n m o u n t .
• React u ses synth etic ev ents , wh ich w o rk co nsistently a cro ss bro w sers.
• E xam ple:
fu n ct io n ha n dl e C lick ()
• Us ed for m anag ing g lob al state and a vo id ing "pro p d rilling ." E xam ple:
jsx
C o p y co d e co n st T he m e C o n te xt =
6. Limitations
36
1. Learning Curve: JS X a nd co m po nent-b ased d ev el opm ent ca n be c halleng ing fo r b eginners.
2 . Fast-Paced Updates: React evo lv es q u ickly , requ iring d evelo pers to stay upd a ted .
3. Complex Setup: Requ ires co nfig u ratio n with to o ls lik e W eb pack o r B ab el fo r fu ll a ppl icatio ns.
7. React Ecosystem
37
8. Popular Use Cases
9. Example Code
jsx
C o p y co d e im p o rt R e a ct f ro m
< d iv >
< /d iv >
);
10. Conclusion
38
React Hooks
1. Introduction
• Functional Paradigm: H o o ks lev era ge th e fu nctiona l pro gram m ing pa rad ig m , wh ich alig ns
• Synta x:
39
• H and les side effects lik e d ata fetch ing , su bscriptio ns, o r ma nua lly c hang ing the DO M .
• Synta x:
• Creates a mutable reference to a n elem ent or v alu e th at persists acro ss rend ers.
• 4. Advanced Hooks
1 . useImperativeHandle:
2 . useLayoutEffect:
o S imilar to us eE ff ec t , bu t fires sy nchro nou sly after all D O M m uta tio ns.
3 . useDebugValue:
5. Custom Hooks
• Dev elo pers ca n crea te their o wn ho o k s to encapsu la te and reu se log ic.
• E xam ple:
40
{ c on s t [da ta , se tD a ta ] =
us eS ta te (n u ll );
.t he n (se tD a ta );
} , [u rl ]);
6. Advantages of Hooks
1. Simplifies co mpo nent lo g ic b y elim ina ting th e need fo r class co mpo nents.
7. Limitations of Hooks
3. Req uires u nd ersta nding o f clo su res a nd func tio nal pro g ra mm ing co ncepts.
R e a c t .js h a s e m e rg e d a s o n e of th e m o st p o w e rf u l a n d p o p u la r t o o ls f o r bu ildin g
a rc h it e c t u re , e ff ic ie n t V irtu a l D O M , a n d ro b u st e c o sy st e m e n a b le d e v e lo p e rs t o
41
W it h it s stro n g c om m u n ity su p p o rt , c o n t in u o u s u p d a t e s, a n d c o m p a t ibilit y w it h
fo r d e v e lo p e rs lo o k in g t o d e live r e xc e p t io n a l u se r e xp e rie n c e s.
CHAPTER 6
MongoDB
6.1IntroductiontoMongoDB
M o n go D B is a n o p e n -so u rc e , N o SQ L d a t a b a se t ha t u se s a d o c u m e n t -o rie n t e d a p p ro a c h f o r d a t a
st o ra g e . U n lik e t ra d it io n a l re la t io n a l d a t a ba se s, M o n go D B s to re s d a t a in fle xible , JS O N -lik e
d o c u m e n t s c a lle d B SO N , e n a b lin g fa st a n d d y n a m ic sc h e m a d es ig n . It is w id e ly u se d f o r m od e r n
a p p lic a t io n s re q u irin g sc a la b ilit y , fle xibilit y , a n d h igh p e rf o rm a n c e .
M o n go D B e xc e ls in m a n a g in g u n st ru c t u re d o r se m i-stru c t u re d d a t a , m a k in g it a p e rf e c t c ho ic e
f o r a p p lic a t io n s lik e c o n t e n t m a n a g e m e n t , Io T, a n d b ig d a t a p ro c e ssin g . A s p a rt o f t he
M E A N / M E R N sta c k ( M o n go D B , E xp re ss, A n gu la r/ R e a c t, N o d e .js) , it p la y s a p iv o ta l r o le in
m o d e rn w e b d e v e lo p m e n t .
42
6.2AdvantagesofMongoDB
6.3CRUDOperations
C R U D o p e ra tio n s re p re se n t t he f u n d a m e n t a l in te ra c tio n s w ith a d a t a b a se :
db.users.insertOne({name:"Alice",age:25,city:"NewYork"}); Read: Q u e ry in g d a t a
u sin g f in d ( ) :
db.users.find({city:"NewYork"});
□ Update: M o d if y in g docu m ents u sin g u pdateO ne() or u p d a t e M a n y ( ):
db.users.updateOne({name:"Alice"},{$set:{ age:26}}); Delete: R e m o v in g
docu m ents w it h d e le te O n e () or d e le t e M a n y ( ):
db.users.deleteOne({name:"Alice"});
6.4DataModelinginMongoDB
M o n go D B ’ s sc h e m a d e sign is h ig hly fle xible , bu t f o llo w in g be st p ra c t ic e s e n su re s o p t im a l
p e rf o rm a n c e :
EmbeddedDocuments: Fo r d a t a w it h a o n e -to -o n e re la t io n sh ip :
{
"name":"Alice",
43
"address":{"city":"NewYork","zip":"10001"}
}
ReferencingDocuments: Fo r o n e -to -m a n y r ela tio n ship s:
{
"_id":1,
"name":"Shopkeeper",
"products":[1001,1002,1003]
}
6.5AggregationFramework
M o n go D B ’ s p o w e rf u l a gg re g a t io n f ra m e w o rk p ro c e sse s a n d tr a n sf o rm s d a t a in p ip e lin e s:
Example: Fe t c h in g th e a ve ra ge a ge o f u se rs in e a c h c it y :
db.users.aggregate([
{$group:{_id:"$city",avgAge:{$avg:"$age"}}}
]);
6.6IndexinginMongoDB
In d e xe s im p ro ve q u e ry p er fo rm a n c e by re d u c in g t he t im e t o lo c a te d a ta :
CreatingIndexes:
db.users.createIndex({name:1 });
CompoundIndexes: C o m b in e m u lt ip le f ie ld s:
db.users.createIndex({city:1,age:-1});
Chapter 7
44
Node.js
Se t t in g u p a n E xp re ss S e rv e r:
45
7.5 Real-Time Applications
R e a l-t im e a p p lic a tio n s lik e c ha t o r c o lla bo ra tive t o o ls le ve ra ge W e bS o c k e t s in N o d e .js:
46
CHAPTER-8
ABOUT PROJECT
8.1 Introduction:
K e y fe a tu r e s o f Tra n zy in c lu de :
47
B y in t e gr a t in g te c h n o lo gy in t o e v e ry d a y tra n sp o rt a t io n , Tra n zy c o n t ribu t e s to a m o re
o rga n iz e d a n d h a ssle -fre e c o m m u t in g e xp e rie n c e , m a k in g it a n e sse n t ia l to o l f o r m o d e rn
c o lle ge c a m p u se s.
8.2 Background:
8.3 Objective
• Enhance Transparency and Safety: P ro vid e a c c e ssib le d rive r p ro file s a n d bu s d et a ils t o b u ild
t ru st a m o n g u se rs.
48
• Promote Smart Transportation: In t e gra te t e c hn o lo gy t o m o d e rn ize c a m p us m o bilit y a n d
e n ha n c e th e c om m u t in g e xp er ie n c e .
8.4 Purpose
Th e pu r p os e o f th e B u s-E c ru p la t fo rm in c lu d e s:
• Tr a n sp o rt a t io n M a n a g e m e n t : M a in t a in o r ga n iz e d a n d d et a ile d re c o rd s of b u s ro u t e s,
sc he d u le s, a n d d rive r in f or m a t io n t o e n su re sm o o th o p e ra t io n .
• R o u t e a n d Sc h e d u le In f o rm a tio n : O f fe r u se rs c le a r a n d u p -t o -d a te d e t a ils a bo u t bu s
ro u te s, st o p s, a n d t im in g s fo r b e tt e r p la n n in g.
• U se r A u th e n t ic a tio n a n d A c c e ss C o n t ro l: E n su re se c u re a c c e ss to t h e p la tf o rm w ith
ro le -b a se d a u t he n t ic a t io n f o r stu d e n t s, st a f f, a n d a d m in istra to r s.
8.5 Scope
Th e B u s-E c ru p la t fo rm is d e sig n e d t o a d d re ss t h e tra n sp o rt a t io n n ee d s o f st u d e n t s,
fa c u lty , a n d st a f f a c r o ss t he e n tire c a m p u s. It p ro v id e s re a l-t im e G P S tra c k in g f o r
bu se s, a llo w in g u se rs t o m o n it o r live lo c a tio n s a n d e st im a t e a rr iv a l t im e s
a c c u ra te ly . Th e p la t f o rm su p p o rts c o m p re h e n sive ro u t e m a n a g e m e n t , c o ve rin g a ll
c a m pu s ro u te s, st o p s, a n d sc h e d ule s, w hile a lso o f fe r in g d e t a iled d rive r in f o rm a tio n
to e n su re t ra n sp a re n c y a n d sa f e ty . W ith ro le -ba se d a c c e ss, it a c c o m m o d a te s v a rio u s
u se r t y p e s, in c lu d in g st u d e n ts, st a f f, a d m in ist ra t o rs, a n d d riv e rs, e n su rin g se c u re
a n d p e rso n a lize d in te ra c t io n s. A c c e ssible t h ro u gh a n y w e b-e n a b le d d e vic e , B u s-E c ru
bo a sts a u se r-fr ie n d ly in t e rf a c e th a t s im p lifie s n a v ig a t io n a n d c o m m u tin g . It s
sc a la b le d e sign a llo w s f o r f u t u re e xp a n s io n to in c lu d e a d dit io n a l c a m p u se s,
ve h ic le s, o r ro u t e s, a n d it c a n b e e n h a n c e d w ith a d v a n c e d fe a tu re s su c h a s
49
au tom ated n o t if ic a t io n s and d a ta a n a ly tic s for im p ro v e d e ff ic ie n c y and
e n viro n m e n t a l im p a c t tra c k in g .
A dm in Fea tu res:
• U ser M ana g em ent: o A dm in ca n view a ll reg ist ered u sers (stu dents,
o M onitor adh erence t o sch edu les and optim iz e rou t es for efficiency.
50
o G enera te repo rts on bu s u t iliza tion, u ser activ ities, a nd pla tform
o U pda te pla tform inform at io n, inclu ding a nnou ncem ents, e m ergency a lerts,
U ser F ea tu res:
o View B u s R ou te s: B row se a nd sea rch for a va ilab le ro u tes and schedu les. o
2. Driv er F ea tu re s:
o View A ssigned Ro u tes: A ccess deta iled inf orm ation ab ou t ro u tes,
stops, and sch edu les. o M a rk T rip P rog re ss: U pdat e b u s statu s du ring
51
rou tes, su ch as a rriva l a t stops or com p letion of trips. o R eceiv e
N otifications: G et a lert s for rou te u pda tes, em erg encies, or spe cia l
B e n e fit s
1. Im p ro v e d E ff ic ie n c y :
o O p t im ize d ro u te s a n d sc h e d u le s im p ro v e o ve ra ll tr a n sp o rt a t io n e f fic ie n c y .
2. E n ha n c e d Tra n sp a re n c y :
3. U se r C o n v e n ie n c e :
4. Sa f e ty A ssu ra n c e:
5. R e d u c e d E n v iro n m e n ta l Im p a c t :
52
6. Sc a la b ility a n d C u sto m iz a t io n :
o Th e p la tf o rm c a n e xp a n d t o a c c o m m o d a t e a d d itio n a l u se rs, ro u te s, o r c a m p u se s, a n d
f e a t u re s c a n be t a ilo r ed t o sp e c if ic n e e d s.
7. D a t a -D rive n Im p r ov e m e n t s:
Disadvantages
1. In it ia l S e tu p C o st s:
2. D e p e n d e n c e o n In t e rn e t C o n n e c tiv it y :
3. Te c h n ic a l G lit c h e s:
4. D a t a S e c u rit y C o n c e rn s:
5. A d a p t a t io n C ha lle n g e s:
6. M a in te n a n c e R e qu ire m e n t s:
53
o R e g u la r u p d a t e s a n d m o n it o rin g a re e sse n t ia l to e n su re sm o o t h f u n c tio n in g, w h ic h c a n
a d d t o o p e ra t io n a l c o st s.
• H TM L
• CSS
• Ja v a S c rip t
• B o o tst ra p
• R e a c t.js
• V e rc e l ( H o stin g )
Software/Hardware Required:
• Software:
o V S C o de ( o r a n y c o d e e d it o r) o W in d o w s O S (o r
e qu iv a le n t O S w it h R e a c t .js su p p o rt )
• Hardware:
o M in im u m P ro c e sso r: In te l i5 / R y z e n 5
o M in im u m R A M : 8 G B
54
CHAPTER-9
CONCLUSION
Th e B u s-E c ru p la t f o rm is a tra n sf or m a t ive so lu t io n f o r m a n a g in g c a m p u s tra n sp o rt a t io n
e ff ic ien t ly a n d e ff e c t iv e ly . B y o f fe rin g re a l-t im e bu s tra c k in g , d e t a iled ro u te m a n a ge m en t ,
a n d a u se r-f rie n d ly in te r fa c e , it e n h a n c e s th e c o m m u tin g e xp e rie n c e f o r stu d e n t s, fa c u lt y ,
and st a f f . W it h f e a t u re s lik e se c u re u se r a u t he n t ic a t io n , ro le -b a se d a c c e ss, and
c o m p re h e n siv e re p o rtin g , it e n su re s tra n sp a re n c y , s a f e ty , a n d o p e ra t io n a l e f fic ie n c y .
55
\\
SCREENSHOTS
• Landing page
56
• Sign UP PAGE
• Login page
57
• Home Page For New user
58
• User Profile
59