├── indeed-clone ├── client │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── routes │ │ │ └── route.js │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── index.js │ │ ├── services │ │ │ └── api.js │ │ ├── App.js │ │ ├── App.css │ │ ├── components │ │ │ ├── Dropdown.jsx │ │ │ └── Header.jsx │ │ ├── pages │ │ │ ├── Home.jsx │ │ │ ├── AllPosts.jsx │ │ │ └── CreatePost.jsx │ │ └── logo.svg │ ├── .gitignore │ ├── package.json │ └── README.md └── server │ ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── indeed │ │ │ └── server │ │ │ ├── constants │ │ │ └── APIConstants.java │ │ │ ├── dao │ │ │ └── PostDao.java │ │ │ ├── service │ │ │ ├── PostService.java │ │ │ └── PostServiceImpl.java │ │ │ ├── dto │ │ │ └── PostDTO.java │ │ │ ├── ServerApplication.java │ │ │ ├── config │ │ │ └── MongoConfig.java │ │ │ ├── model │ │ │ └── PostModal.java │ │ │ └── controller │ │ │ └── PostController.java │ └── test │ │ └── java │ │ └── com │ │ └── indeed │ │ └── server │ │ └── ServerApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── invoice-app ├── client │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── App.js │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── components │ │ │ ├── Header.jsx │ │ │ ├── Invoices.jsx │ │ │ └── AddInvoice.jsx │ │ ├── index.js │ │ ├── App.css │ │ ├── services │ │ │ └── api.js │ │ ├── logo.svg │ │ └── pages │ │ │ └── Home.jsx │ ├── .gitignore │ ├── package.json │ └── README.md └── server │ ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── invoiceprocessing │ │ │ │ └── server │ │ │ │ ├── dao │ │ │ │ └── InvoiceDao.java │ │ │ │ ├── services │ │ │ │ ├── InvoiceService.java │ │ │ │ └── InvoiceServiceImpl.java │ │ │ │ ├── ServerApplication.java │ │ │ │ ├── controller │ │ │ │ └── InvoiceController.java │ │ │ │ └── model │ │ │ │ └── Invoice.java │ │ └── resources │ │ │ └── application.properties │ └── test │ │ └── java │ │ └── com │ │ └── invoiceprocessing │ │ └── server │ │ └── ServerApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── crud-application ├── crud-app │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── Assets │ │ │ └── Images │ │ │ │ ├── youtube.png │ │ │ │ ├── NotFound.jpg │ │ │ │ └── InstaTele.jpeg │ │ ├── Component │ │ │ ├── NotFound.jsx │ │ │ ├── NavBar.jsx │ │ │ ├── CodeForInterview.jsx │ │ │ ├── AddUser.jsx │ │ │ ├── AllUsers.jsx │ │ │ └── EditUser.jsx │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── index.js │ │ ├── Service │ │ │ └── api.js │ │ ├── App.css │ │ ├── Database │ │ │ └── db.json │ │ ├── App.js │ │ └── logo.svg │ ├── .gitignore │ ├── package.json │ └── README.md └── crud │ ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springcrud │ │ │ │ └── crud │ │ │ │ ├── dao │ │ │ │ └── UserDao.java │ │ │ │ ├── CrudApplication.java │ │ │ │ ├── services │ │ │ │ ├── UserService.java │ │ │ │ └── UserServiceImpl.java │ │ │ │ ├── controller │ │ │ │ └── UserController.java │ │ │ │ └── model │ │ │ │ └── User.java │ │ └── resources │ │ │ └── application.properties │ └── test │ │ └── java │ │ └── com │ │ └── springcrud │ │ └── crud │ │ └── CrudApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── quiz-application ├── client │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── assets │ │ │ └── images │ │ │ │ └── bg-cover.png │ │ ├── styles │ │ │ ├── header.module.css │ │ │ ├── input.module.css │ │ │ ├── background.module.css │ │ │ └── breadcrumb.module.css │ │ ├── pages │ │ │ ├── Quiz.jsx │ │ │ ├── Home.jsx │ │ │ └── Login.jsx │ │ ├── constants │ │ │ ├── route.js │ │ │ └── constant.js │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── components │ │ │ ├── Header.jsx │ │ │ ├── BackgroundCanvas.jsx │ │ │ ├── button │ │ │ │ └── Button.jsx │ │ │ ├── input │ │ │ │ └── Input.jsx │ │ │ └── Breadcrumb.jsx │ │ ├── reportWebVitals.js │ │ ├── context │ │ │ └── DataProvider.jsx │ │ ├── index.css │ │ ├── index.js │ │ ├── App.css │ │ ├── services │ │ │ └── api.js │ │ ├── App.js │ │ ├── utils │ │ │ └── common-utils.js │ │ └── logo.svg │ ├── .gitignore │ ├── package.json │ └── README.md └── server │ ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── quizapplication │ │ │ │ └── server │ │ │ │ ├── constants │ │ │ │ ├── ParameterConstants.java │ │ │ │ ├── APIConstants.java │ │ │ │ ├── ApplicationConstants.java │ │ │ │ └── CodeConstant.java │ │ │ │ ├── dto │ │ │ │ ├── RequestHeaderDTO.java │ │ │ │ └── UserProfileDTO.java │ │ │ │ ├── dao │ │ │ │ ├── QuestionDao.java │ │ │ │ └── UserProfileDao.java │ │ │ │ ├── ServerApplication.java │ │ │ │ ├── service │ │ │ │ ├── UserProfileService.java │ │ │ │ ├── QuestionService.java │ │ │ │ └── impl │ │ │ │ │ ├── QuestionServiceImpl.java │ │ │ │ │ └── UserProfileServiceImpl.java │ │ │ │ ├── utils │ │ │ │ ├── Utility.java │ │ │ │ └── CommonResponseEntity.java │ │ │ │ ├── model │ │ │ │ ├── QuestionModel.java │ │ │ │ └── UserProfileModel.java │ │ │ │ └── controller │ │ │ │ ├── QuestionController.java │ │ │ │ └── UserProfileController.java │ │ └── resources │ │ │ └── application.properties │ └── test │ │ └── java │ │ └── com │ │ └── quizapplication │ │ └── server │ │ └── ServerApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── employee-management-system ├── ems-client │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── pages │ │ │ ├── Dashboard.jsx │ │ │ ├── EmployeeDetail.jsx │ │ │ ├── Main.jsx │ │ │ ├── AllEmployees.jsx │ │ │ └── Home.jsx │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── components │ │ │ ├── common │ │ │ │ ├── SuspenseLoader.jsx │ │ │ │ └── ErrorComponent.jsx │ │ │ ├── header │ │ │ │ ├── Header.jsx │ │ │ │ └── Search.jsx │ │ │ ├── home │ │ │ │ └── Information.jsx │ │ │ └── sidebar │ │ │ │ ├── SideBar.jsx │ │ │ │ └── SideBarContent.jsx │ │ ├── constants │ │ │ └── constant.js │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── store │ │ │ ├── slice │ │ │ │ └── userSlice.js │ │ │ └── store.js │ │ ├── index.js │ │ ├── service │ │ │ └── api.js │ │ ├── App.css │ │ ├── config │ │ │ └── sidebar.config.js │ │ ├── Dummy.js │ │ ├── routes │ │ │ └── routes.js │ │ ├── App.js │ │ └── logo.svg │ ├── .gitignore │ ├── package.json │ └── README.md └── ems-service │ ├── images │ ├── Capture4.PNG │ ├── Capture2.PNG1679483031629 │ ├── Capture2.PNG1679486064367 │ ├── Capture2.PNG1679486179015 │ ├── Capture2.PNG1679486238840 │ ├── Capture3.PNG1679483065201 │ ├── Capture3.PNG1679486282186 │ ├── Capture4.PNG1679486498635 │ ├── Capture4.PNG1679486564746 │ ├── Capture4.PNG1679486719999 │ ├── Capture4.PNG1679486817205 │ ├── Capture4.PNG1679487604766 │ ├── photo-1438761681033-6461ffad8d80.jfif1679487640588 │ └── photo-1438761681033-6461ffad8d80.jfif1679487688342 │ ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── emsservice │ │ │ │ ├── repository │ │ │ │ └── EmployeeRepo.java │ │ │ │ ├── service │ │ │ │ ├── EmployeeService.java │ │ │ │ ├── FileService.java │ │ │ │ └── impl │ │ │ │ │ ├── FileServiceImpl.java │ │ │ │ │ └── EmployeeServiceImpl.java │ │ │ │ ├── EmsServiceApplication.java │ │ │ │ ├── controller │ │ │ │ ├── EmployeeController.java │ │ │ │ └── FileController.java │ │ │ │ └── model │ │ │ │ └── Employee.java │ │ └── resources │ │ │ └── application.properties │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── emsservice │ │ └── EmsServiceApplicationTests.java │ ├── .gitignore │ └── pom.xml └── .gitignore /indeed-clone/client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /invoice-app/client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /crud-application/crud-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /quiz-application/client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /invoice-app/client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/invoice-app/client/public/favicon.ico -------------------------------------------------------------------------------- /invoice-app/client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/invoice-app/client/public/logo192.png -------------------------------------------------------------------------------- /invoice-app/client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/invoice-app/client/public/logo512.png -------------------------------------------------------------------------------- /indeed-clone/client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/indeed-clone/client/public/favicon.ico -------------------------------------------------------------------------------- /indeed-clone/client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/indeed-clone/client/public/logo192.png -------------------------------------------------------------------------------- /indeed-clone/client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/indeed-clone/client/public/logo512.png -------------------------------------------------------------------------------- /quiz-application/client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/quiz-application/client/public/favicon.ico -------------------------------------------------------------------------------- /quiz-application/client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/quiz-application/client/public/logo192.png -------------------------------------------------------------------------------- /quiz-application/client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/quiz-application/client/public/logo512.png -------------------------------------------------------------------------------- /crud-application/crud-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/public/favicon.ico -------------------------------------------------------------------------------- /crud-application/crud-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/public/logo192.png -------------------------------------------------------------------------------- /crud-application/crud-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/public/logo512.png -------------------------------------------------------------------------------- /crud-application/crud-app/src/Assets/Images/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/src/Assets/Images/youtube.png -------------------------------------------------------------------------------- /quiz-application/client/src/assets/images/bg-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/quiz-application/client/src/assets/images/bg-cover.png -------------------------------------------------------------------------------- /quiz-application/client/src/styles/header.module.css: -------------------------------------------------------------------------------- 1 | .container > p { 2 | font-size: 60px; 3 | background-color: var(--color-FFFFFF); 4 | width: fit-content; 5 | } -------------------------------------------------------------------------------- /crud-application/crud-app/src/Assets/Images/NotFound.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/src/Assets/Images/NotFound.jpg -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-client/public/favicon.ico -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-client/public/logo192.png -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-client/public/logo512.png -------------------------------------------------------------------------------- /quiz-application/client/src/pages/Quiz.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | const Quiz = () => { 5 | 6 | return ( 7 |

Quiz

8 | ) 9 | } 10 | 11 | export default Quiz; -------------------------------------------------------------------------------- /crud-application/crud-app/src/Assets/Images/InstaTele.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/crud-application/crud-app/src/Assets/Images/InstaTele.jpeg -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG -------------------------------------------------------------------------------- /invoice-app/client/src/App.js: -------------------------------------------------------------------------------- 1 | 2 | import Home from './pages/Home'; 3 | 4 | function App() { 5 | return ( 6 | 7 | ); 8 | } 9 | 10 | export default App; 11 | -------------------------------------------------------------------------------- /indeed-clone/client/src/routes/route.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const routePath = { 4 | home : '/', 5 | posts : '/posts', 6 | create : '/create', 7 | invalid : '/*' 8 | } -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture2.PNG1679483031629: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture2.PNG1679483031629 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture2.PNG1679486064367: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture2.PNG1679486064367 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture2.PNG1679486179015: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture2.PNG1679486179015 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture2.PNG1679486238840: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture2.PNG1679486238840 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture3.PNG1679483065201: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture3.PNG1679483065201 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture3.PNG1679486282186: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture3.PNG1679486282186 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG1679486498635: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG1679486498635 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG1679486564746: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG1679486564746 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG1679486719999: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG1679486719999 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG1679486817205: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG1679486817205 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/Capture4.PNG1679487604766: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/Capture4.PNG1679487604766 -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/pages/Dashboard.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | const Dashboard = () => { 6 | 7 | return ( 8 |
Hello
9 | ) 10 | } 11 | 12 | export default Dashboard; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/pages/EmployeeDetail.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | const EmployeeDetail = () => { 5 | 6 | return ( 7 |
Detail
8 | ) 9 | } 10 | 11 | export default EmployeeDetail; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.uri=mongodb+srv://user:codeforinterview@indeed-clone.yalykvn.mongodb.net/?retryWrites=true&w=majority 2 | spring.data.mongodb.database=indeed-clone 3 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/constants/ParameterConstants.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.constants; 2 | 3 | public class ParameterConstants { 4 | 5 | public static final String RH_PHONE = "phone"; 6 | } 7 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/photo-1438761681033-6461ffad8d80.jfif1679487640588: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/photo-1438761681033-6461ffad8d80.jfif1679487640588 -------------------------------------------------------------------------------- /employee-management-system/ems-service/images/photo-1438761681033-6461ffad8d80.jfif1679487688342: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kunaltyagi9/Spring-Boot-Projects/HEAD/employee-management-system/ems-service/images/photo-1438761681033-6461ffad8d80.jfif1679487688342 -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/dto/RequestHeaderDTO.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class RequestHeaderDTO { 7 | 8 | private long phone; 9 | } 10 | -------------------------------------------------------------------------------- /quiz-application/client/src/constants/route.js: -------------------------------------------------------------------------------- 1 | 2 | export const routePath = { 3 | home: '/home', 4 | login: '/login', 5 | quiz: '/quiz', 6 | result: '/result', 7 | invalid: '*' 8 | } 9 | 10 | export const API_URL = "http://localhost:8080" -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/NotFound.jsx: -------------------------------------------------------------------------------- 1 | import notfound from '../Assets/Images/NotFound.jpg'; 2 | 3 | const NotFound = () => { 4 | return ( 5 | 6 | ) 7 | } 8 | 9 | export default NotFound; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/constants/APIConstants.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.constants; 2 | 3 | public class APIConstants { 4 | 5 | public static final String GET_ALL_POSTS = "/posts"; 6 | 7 | public static final String SAVE_POST = "/post"; 8 | } 9 | -------------------------------------------------------------------------------- /indeed-clone/client/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /invoice-app/client/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /quiz-application/client/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /indeed-clone/client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/dao/PostDao.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.dao; 2 | 3 | import com.indeed.server.model.PostModal; 4 | import org.springframework.data.mongodb.repository.MongoRepository; 5 | 6 | public interface PostDao extends MongoRepository { 7 | } 8 | -------------------------------------------------------------------------------- /invoice-app/client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /quiz-application/client/src/styles/input.module.css: -------------------------------------------------------------------------------- 1 | .inputText { 2 | font-size: 16px; 3 | font-weight: 500; 4 | width: 100%; 5 | box-sizing: border-box; 6 | padding: 15px; 7 | border-radius: 4px 4px 0 0; 8 | margin-top: 20px; 9 | /* color: var(--color-FFFFFF); */ 10 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /quiz-application/client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud.dao; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import com.springcrud.crud.model.User; 6 | 7 | public interface UserDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/dto/UserProfileDTO.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserProfileDTO { 7 | 8 | private Long phone; 9 | 10 | private String name; 11 | 12 | private String email; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/dao/InvoiceDao.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server.dao; 2 | 3 | import com.invoiceprocessing.server.model.Invoice; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface InvoiceDao extends JpaRepository { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /crud-application/crud/src/test/java/com/springcrud/crud/CrudApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class CrudApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /indeed-clone/server/src/test/java/com/indeed/server/ServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/repository/EmployeeRepo.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.repository; 2 | 3 | import com.example.emsservice.model.Employee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface EmployeeRepo extends JpaRepository { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /invoice-app/server/src/test/java/com/invoiceprocessing/server/ServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /quiz-application/server/src/test/java/com/quizapplication/server/ServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/test/java/com/example/emsservice/EmsServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class EmsServiceApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /quiz-application/client/src/components/Header.jsx: -------------------------------------------------------------------------------- 1 | 2 | import styles from '../styles/header.module.css'; 3 | import Breadcrumb from './Breadcrumb'; 4 | 5 | const Header = () => { 6 | 7 | return ( 8 |
9 |

Quiz Time!

10 | 11 |
12 | ) 13 | } 14 | 15 | export default Header; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/service/PostService.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.service; 2 | 3 | import com.indeed.server.dto.PostDTO; 4 | import com.indeed.server.model.PostModal; 5 | 6 | import java.util.List; 7 | 8 | public interface PostService { 9 | 10 | public List getAllPosts(); 11 | 12 | public PostModal savePost(PostDTO post); 13 | } 14 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #MYSQL DATABASE CONFIGURATIONS 2 | spring.datasource.url=jdbc:mysql:///invoiceprocessingsystem 3 | spring.datasource.username=root 4 | spring.datasource.password=codeforinterview 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | 7 | #HIBERNATE CONFIGURATIONS 8 | spring.jpa.hibernate.ddl-auto=update 9 | spring.jpa.show-sql=true -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/common/SuspenseLoader.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { Typography, CircularProgress, Box } from "@mui/material"; 3 | 4 | 5 | const SuspenseLoader = () => { 6 | 7 | return ( 8 | 9 | 10 | Loading... 11 | 12 | ) 13 | } 14 | 15 | export default SuspenseLoader; -------------------------------------------------------------------------------- /quiz-application/server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #MYSQL DATABASE CONFIGURATIONS 2 | spring.datasource.url=jdbc:mysql:///quizapplication 3 | spring.datasource.username=root 4 | spring.datasource.password=codeforinterview 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | 7 | #HIBERNATE CONFIGURATIONS 8 | spring.jpa.hibernate.ddl-auto=update 9 | spring.jpa.show-sql=true 10 | -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/dto/PostDTO.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PostDTO { 7 | 8 | private String profile; 9 | 10 | private String type; 11 | 12 | private String description; 13 | 14 | private String experience; 15 | 16 | private String technology[]; 17 | 18 | private String salary; 19 | } 20 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/constants/constant.js: -------------------------------------------------------------------------------- 1 | export const companyLogo = 'https://cdn.cookielaw.org/logos/bf68afa0-3c8d-4d2e-9472-6b54f14f5822/c0260794-d5a4-4dee-be60-c94a329c4569/14f6654a-d2ca-4468-a2e3-1c154ca392fd/Gilead_Logo_standard_RGB.png'; 2 | export const sideBarImage='https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8ZW1wbG95ZWV8ZW58MHx8MHx8&w=1000&q=80'; -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/CrudApplication.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class CrudApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(CrudApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/ServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /quiz-application/client/src/styles/background.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 50px; 3 | margin: 50px auto; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | background-color: #D088E5; 8 | width: 50%; 9 | border-radius: 10px; 10 | } 11 | 12 | .cover { 13 | background-color: var(--color-FFFFFF); 14 | border-radius: 10px; 15 | width: 100%; 16 | padding: 10px; 17 | } -------------------------------------------------------------------------------- /indeed-clone/client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /invoice-app/client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/services/InvoiceService.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server.services; 2 | 3 | import com.invoiceprocessing.server.model.Invoice; 4 | 5 | import java.util.List; 6 | 7 | public interface InvoiceService { 8 | 9 | public Invoice addInvoice(Invoice invoice); 10 | 11 | public List getInvoices(); 12 | 13 | public Invoice deleteInvoice(long id); 14 | } 15 | -------------------------------------------------------------------------------- /crud-application/crud-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /quiz-application/client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/dao/QuestionDao.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.dao; 2 | 3 | import com.quizapplication.server.model.QuestionModel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface QuestionDao extends JpaRepository { 9 | 10 | List findByCategory(String category); 11 | } 12 | -------------------------------------------------------------------------------- /indeed-clone/client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /invoice-app/client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /indeed-clone/client/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /invoice-app/client/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/ServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/ServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /quiz-application/client/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /quiz-application/client/src/styles/breadcrumb.module.css: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | margin-top: 10px; 3 | padding: 0 5px; 4 | list-style: none; 5 | list-style-type: none; 6 | display: flex; 7 | align-items: center; 8 | background-color: var(--color-FFFFFF); 9 | width: fit-content; 10 | } 11 | 12 | .breadcrumbItem { 13 | margin-right: 10px; 14 | } 15 | 16 | .breadcrumbItem::after { 17 | content: "/"; 18 | margin-left: 10px; 19 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/services/UserService.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud.services; 2 | 3 | import java.util.List; 4 | 5 | import com.springcrud.crud.model.User; 6 | 7 | public interface UserService { 8 | 9 | public List getUsers(); 10 | 11 | public User getUser(long userId); 12 | 13 | public User addUser(User user); 14 | 15 | public User updateUser(User user); 16 | 17 | public User deleteUser(long userId); 18 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/dao/UserProfileDao.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.dao; 2 | 3 | import com.quizapplication.server.model.UserProfileModel; 4 | import jakarta.transaction.Transactional; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | @Transactional 8 | public interface UserProfileDao extends JpaRepository { 9 | 10 | UserProfileModel findByPhone(Long phone); 11 | } 12 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # MySQL Database Configuration 2 | spring.datasource.url=jdbc:mysql:///cruddatabase 3 | spring.datasource.username=root 4 | spring.datasource.password=codeforinterview 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | 7 | # Hibermate Configuration 8 | spring.jpa.hibernate.ddl-auto=update 9 | spring.jpa.show-sql=true 10 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect 11 | -------------------------------------------------------------------------------- /quiz-application/client/src/components/BackgroundCanvas.jsx: -------------------------------------------------------------------------------- 1 | 2 | import styles from '../styles/background.module.css'; 3 | import Header from './Header'; 4 | 5 | const BackgroundCanvas = ({ children }) => { 6 | 7 | return ( 8 |
9 |
10 |
11 | {children} 12 |
13 |
14 | ) 15 | } 16 | 17 | export default BackgroundCanvas -------------------------------------------------------------------------------- /invoice-app/client/src/components/Header.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { AppBar, Toolbar } from '@mui/material'; 3 | 4 | const Header = () => { 5 | const logo = "https://dashboard.getinvoice.co/dboard/img/logo.png"; 6 | 7 | return ( 8 | 9 | 10 | logo 11 | 12 | 13 | ) 14 | } 15 | 16 | export default Header; -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/service/UserProfileService.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.service; 2 | 3 | import com.quizapplication.server.dto.RequestHeaderDTO; 4 | import com.quizapplication.server.dto.UserProfileDTO; 5 | import org.springframework.http.ResponseEntity; 6 | 7 | public interface UserProfileService { 8 | 9 | public ResponseEntity saveUserData(UserProfileDTO userProfileDTO, RequestHeaderDTO requestHeaderDTO); 10 | } 11 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/constants/APIConstants.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.constants; 2 | 3 | public class APIConstants { 4 | 5 | public static final String SAVE_USER_DETAIL = "/save-user-detail"; 6 | 7 | public static final String GET_USER_DETAIL = "/get-user-detail"; 8 | 9 | public static final String GET_ALL_QUESTIONS = "/all-questions"; 10 | 11 | public static final String GET_QUESTION_BY_CATEGORY = "/category"; 12 | } 13 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/service/QuestionService.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.service; 2 | 3 | import com.quizapplication.server.model.QuestionModel; 4 | import org.springframework.http.ResponseEntity; 5 | 6 | import java.util.List; 7 | 8 | public interface QuestionService { 9 | 10 | public ResponseEntity> getAllQuestions(); 11 | 12 | public ResponseEntity> getQuestionsByCategory(String category); 13 | } 14 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/common/ErrorComponent.jsx: -------------------------------------------------------------------------------- 1 | import { Typography, Box } from "@mui/material"; 2 | import { useRouteError } from "react-router-dom" 3 | 4 | const ErrorComponent = () => { 5 | const error = useRouteError(); 6 | console.log(error); 7 | 8 | return ( 9 | 10 | There was error loading this page 11 | 12 | ) 13 | } 14 | 15 | export default ErrorComponent; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/store/slice/userSlice.js: -------------------------------------------------------------------------------- 1 | import { createSlice } from "@reduxjs/toolkit"; 2 | 3 | const initialState = { 4 | employees: [] 5 | } 6 | 7 | const employeeSlice = createSlice({ 8 | name: 'employeeSlice', 9 | initialState: initialState, 10 | reducers: { 11 | setEmployees: (state, { payload: { employees } }) => { 12 | state.employees = employees 13 | } 14 | } 15 | }) 16 | 17 | 18 | export const { setEmployees } = employeeSlice.actions; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/store/store.js: -------------------------------------------------------------------------------- 1 | import { configureStore, combineReducers } from "@reduxjs/toolkit"; 2 | 3 | 4 | const combinedReducer = combineReducers({ 5 | [employeeSlice.name]: employeeSlice.reducer, 6 | }) 7 | 8 | const rootReducer = (state, action) => { 9 | if (action.type === 'authSlice/logout') { 10 | state = undefined; 11 | } 12 | return combinedReducer(state, action); 13 | } 14 | 15 | export const store = configureStore({ 16 | reducer: rootReducer 17 | }); -------------------------------------------------------------------------------- /quiz-application/client/src/components/button/Button.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | const Button = ({ 5 | label="", 6 | className="", 7 | disabled=false, 8 | id, 9 | onClick = () => { 10 | console.log('Please provide the onClick property') 11 | } 12 | }) => { 13 | return ( 14 | 21 | ) 22 | } 23 | 24 | export default Button; -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/constants/ApplicationConstants.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.constants; 2 | 3 | public class ApplicationConstants { 4 | 5 | public static final String EXCEPTION_OCCUR = "Something went wrong"; 6 | 7 | public static final String RESPONSE_CODE = "code"; 8 | 9 | public static final String RESPONSE_MSG = "msg"; 10 | 11 | public static final String REQUEST_STATUS = "status"; 12 | 13 | public static final String RESPONSE_DATA = "data"; 14 | } 15 | -------------------------------------------------------------------------------- /crud-application/crud/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /indeed-clone/server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /invoice-app/server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /quiz-application/server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/service/EmployeeService.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.service; 2 | 3 | import com.example.emsservice.model.Employee; 4 | import java.util.List; 5 | 6 | public interface EmployeeService { 7 | 8 | public Employee addEmployee(Employee employee); 9 | 10 | public List getEmployees(); 11 | 12 | public Employee getEmployee(long employeeId); 13 | 14 | public Employee updateEmployeeInfo(Employee employee); 15 | 16 | public Employee deleteEmployeeInfo(long employeeId); 17 | } 18 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /quiz-application/client/src/context/DataProvider.jsx: -------------------------------------------------------------------------------- 1 | import { createContext, useState } from "react"; 2 | import { loginDefault } from '../constants/constant'; 3 | 4 | export const DataContext = createContext(); 5 | 6 | const DataProvider = ({ children }) => { 7 | const [loginDetails, setLoginDetails] = useState(loginDefault); 8 | 9 | return ( 10 | 14 | {children} 15 | 16 | ) 17 | } 18 | 19 | export default DataProvider; -------------------------------------------------------------------------------- /crud-application/crud-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/service/FileService.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | import org.springframework.web.multipart.MultipartFile; 5 | 6 | import java.io.FileNotFoundException; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | 10 | public interface FileService { 11 | 12 | public String uploadImage(String path, MultipartFile file) throws IOException; 13 | 14 | public InputStream getImageByImageName(String name, String prePath) throws FileNotFoundException; 15 | } 16 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #MySQL Configurations 2 | spring.datasource.url=jdbc:mysql:///ems 3 | spring.datasource.username=root 4 | spring.datasource.password=codeforinterview 5 | 6 | #Hibernate Configurations 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.jpa.show-sql=true 9 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect 10 | 11 | #File upload configuration 12 | spring.servlet.multipart.max-file-size=10MB 13 | spring.servlet.multipart.max-request-size=10MB 14 | 15 | #Folder in which our image will upload 16 | project.image=images/ -------------------------------------------------------------------------------- /indeed-clone/client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /invoice-app/client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /quiz-application/client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | box-sizing: border-box; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 13 | monospace; 14 | } 15 | 16 | * { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | :root { 22 | --color-BE97EC: #BE97EC; 23 | --color-FFFFFF: #FFFFFF; 24 | } 25 | -------------------------------------------------------------------------------- /quiz-application/client/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { useNavigate } from 'react-router-dom'; 3 | import { routePath } from '../constants/route'; 4 | 5 | const Home = () => { 6 | 7 | const navigate = useNavigate(); 8 | 9 | const homeImg = "https://www.leadfuze.com/wp-content/uploads/2020/12/shutterstock_749036344.jpg"; 10 | 11 | return ( 12 |
13 | home 14 | 16 |
17 | ) 18 | } 19 | 20 | export default Home; -------------------------------------------------------------------------------- /indeed-clone/client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /indeed-clone/client/src/services/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const API_URL = 'http://localhost:8080'; 4 | 5 | export const savePost = async (payload) => { 6 | try { 7 | return await axios.post(`${API_URL}/post`, payload); 8 | } catch (error) { 9 | console.log('Error: ', error.message); 10 | return error.response.data; 11 | } 12 | } 13 | 14 | export const getAllPosts = async () => { 15 | try { 16 | return await axios.get(`${API_URL}/posts`); 17 | } catch (error) { 18 | console.log('Error: ', error.message); 19 | return error.response.data; 20 | } 21 | } -------------------------------------------------------------------------------- /invoice-app/client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /quiz-application/client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /quiz-application/client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /crud-application/crud-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /indeed-clone/client/src/App.js: -------------------------------------------------------------------------------- 1 | 2 | import Home from './pages/Home'; 3 | import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; 4 | import AllPosts from './pages/AllPosts'; 5 | import { routePath } from './routes/route'; 6 | import CreatePost from './pages/CreatePost'; 7 | 8 | function App() { 9 | return ( 10 | 11 | 12 | } /> 13 | } /> 14 | } /> 15 | 16 | 17 | ); 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/utils/Utility.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.utils; 2 | 3 | import com.quizapplication.server.constants.ParameterConstants; 4 | import com.quizapplication.server.dto.RequestHeaderDTO; 5 | 6 | import java.util.Map; 7 | 8 | public class Utility { 9 | 10 | 11 | public static RequestHeaderDTO getRequestHeaderDTO(Map headerMap) { 12 | RequestHeaderDTO requestHeaderDTO = new RequestHeaderDTO(); 13 | 14 | requestHeaderDTO.setPhone(Long.parseLong(headerMap.get(ParameterConstants.RH_PHONE))); 15 | 16 | return requestHeaderDTO; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/service/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const API_URL = 'http://localhost:8080'; 4 | 5 | export const getAllEmployees = async () => { 6 | try { 7 | const response = await axios.get(`${API_URL}/employees`); 8 | return response.data; 9 | } catch (error) { 10 | console.error('Error while calling the api ', error.message); 11 | } 12 | } 13 | 14 | export const uploadFile = async (data) => { 15 | try { 16 | const response = await axios.post(`${API_URL}/file/upload`, data); 17 | return response.data; 18 | } catch (error) { 19 | console.error('Error while calling the api ', error.message); 20 | } 21 | } -------------------------------------------------------------------------------- /quiz-application/client/src/constants/constant.js: -------------------------------------------------------------------------------- 1 | import { routePath } from "./route" 2 | 3 | export const MESSAGES = { 4 | invalidPhone: 'Please enter a valid mobile number', 5 | invalidName: 'Please enter a valid name', 6 | invalidEmail: 'Please enter a valid email id', 7 | invalidApi: 'Something went wrong, please try again later' 8 | } 9 | 10 | export const breadcrumbItems = [ 11 | { id: 0, label: 'Home', link: routePath.home }, 12 | { id: 1, label: 'Login', link: routePath.login }, 13 | { id: 2, label: 'Quiz', link: routePath.quiz }, 14 | { id: 3, label: 'Result', link: routePath.result }, 15 | ]; 16 | 17 | export const loginDefault = { 18 | phone: '', 19 | name: '', 20 | email: '' 21 | } -------------------------------------------------------------------------------- /crud-application/crud-app/src/Service/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const usersUrl = 'http://localhost:8080'; 4 | 5 | 6 | export const getUsers = async (id) => { 7 | id = id || ''; 8 | try { 9 | return await axios.get(`${usersUrl}/users/${id}`); 10 | } catch (error) { 11 | console.log('Error while calling getUsers api ', error); 12 | } 13 | } 14 | 15 | export const addUser = async (user) => { 16 | return await axios.post(`${usersUrl}/user`, user); 17 | } 18 | 19 | export const deleteUser = async (id) => { 20 | return await axios.delete(`${usersUrl}/user/${id}`); 21 | } 22 | 23 | export const editUser = async (id, user) => { 24 | return await axios.put(`${usersUrl}/user`, user) 25 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/header/Header.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { AppBar, Toolbar, Button, styled } from '@mui/material'; 4 | import { companyLogo } from '../../constants/constant'; 5 | import Search from './Search'; 6 | 7 | const StyledToolBar = styled(Toolbar)({ 8 | display: 'flex', 9 | justifyContent: 'space-between' 10 | }) 11 | 12 | const Header = () => { 13 | 14 | return ( 15 | 16 | 17 | logo 18 | 19 | 20 | 21 | 22 | ) 23 | } 24 | 25 | export default Header; -------------------------------------------------------------------------------- /indeed-clone/client/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /invoice-app/client/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /quiz-application/client/src/components/input/Input.jsx: -------------------------------------------------------------------------------- 1 | 2 | import styles from '../../styles/input.module.css'; 3 | 4 | const Input = ({ 5 | placeholder="", 6 | type="text", 7 | id, 8 | className, 9 | error, 10 | background="transparent", 11 | disabled=false, 12 | ...props 13 | }) => { 14 | return ( 15 |
16 | 25 | 26 |
27 | ) 28 | } 29 | 30 | export default Input -------------------------------------------------------------------------------- /crud-application/crud-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /quiz-application/client/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/NavBar.jsx: -------------------------------------------------------------------------------- 1 | import { AppBar, Toolbar, styled } from '@mui/material'; 2 | import { NavLink } from 'react-router-dom'; 3 | 4 | const Header = styled(AppBar)` 5 | background: #111111; 6 | `; 7 | 8 | const Tabs = styled(NavLink)` 9 | color: #FFFFFF; 10 | margin-right: 20px; 11 | text-decoration: none; 12 | font-size: 20px; 13 | `; 14 | 15 | const NavBar = () => { 16 | 17 | return ( 18 |
19 | 20 | Code for Interview 21 | All Users 22 | Add User 23 | 24 |
25 | ) 26 | } 27 | 28 | export default NavBar; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/config/MongoConfig.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.data.mongodb.MongoDatabaseFactory; 6 | import org.springframework.data.mongodb.config.EnableMongoAuditing; 7 | import org.springframework.data.mongodb.core.MongoTemplate; 8 | import org.springframework.data.mongodb.core.convert.MappingMongoConverter; 9 | 10 | @Configuration 11 | @EnableMongoAuditing 12 | public class MongoConfig { 13 | @Bean 14 | public MongoTemplate mongoTemplate(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter converter) { 15 | return new MongoTemplate(mongoDbFactory, converter); 16 | } 17 | } -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/model/QuestionModel.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.model; 2 | 3 | import jakarta.persistence.Entity; 4 | import jakarta.persistence.GeneratedValue; 5 | import jakarta.persistence.GenerationType; 6 | import jakarta.persistence.Id; 7 | import lombok.Data; 8 | 9 | @Entity 10 | @Data 11 | public class QuestionModel { 12 | 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.AUTO) 15 | private int id; 16 | 17 | private String title; 18 | 19 | private String option1; 20 | 21 | private String option2; 22 | 23 | private String option3; 24 | 25 | private String option4; 26 | 27 | private String answer; 28 | 29 | private String level; 30 | 31 | private String category; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/Database/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "users": [ 3 | { 4 | "name": "Mohd Shami", 5 | "username": "mohdshami", 6 | "email": "shami@gmail.com", 7 | "phone": "7896547896", 8 | "id": 4 9 | }, 10 | { 11 | "name": "Shikhar Dhawan", 12 | "username": "dhawansikhar", 13 | "email": "dhawan@gmail.com", 14 | "phone": "4569874563", 15 | "id": 6 16 | }, 17 | { 18 | "name": "Virat Kohli", 19 | "username": "viratkohli", 20 | "email": "viratkohli@gmail.com", 21 | "phone": "8596589658", 22 | "id": 7 23 | }, 24 | { 25 | "name": "Pankaj Tripathi", 26 | "username": "pankajtripathi", 27 | "email": "pankaj@gmail.com", 28 | "phone": "9658965236", 29 | "id": 8 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/pages/Main.jsx: -------------------------------------------------------------------------------- 1 | import { Suspense } from "react"; 2 | import Header from "../components/header/Header"; 3 | import SideBar from "../components/sidebar/SideBar"; 4 | import { Box, styled } from '@mui/material'; 5 | import { Outlet } from "react-router-dom"; 6 | import SuspenseLoader from "../components/common/SuspenseLoader"; 7 | 8 | const Wrapper = styled(Box)({ 9 | display: 'flex', 10 | margin: '64px 0 0 250px', 11 | }); 12 | 13 | const Main = () => { 14 | return ( 15 | <> 16 |
17 | 18 | 19 | } > 20 | 21 | 22 | 23 | 24 | 25 | 26 | ); 27 | } 28 | 29 | export default Main; 30 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/CodeForInterview.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { Box, Typography, styled } from '@mui/material'; 3 | import Youtube from '../Assets/Images/youtube.png'; 4 | import InstaTele from '../Assets/Images/InstaTele.jpeg'; 5 | 6 | const Header = styled(Box)` 7 | margin: 50px; 8 | & > div { 9 | margin-top: 50px; 10 | } 11 | `; 12 | 13 | const Image = styled('img')({ 14 | width: '50%', 15 | height: '50%' 16 | }); 17 | 18 | const CodeForInterview = () => { 19 | 20 | return ( 21 |
22 | Code for Interview 23 | 24 | 25 | 26 | 27 |
28 | ) 29 | } 30 | 31 | export default CodeForInterview; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/config/sidebar.config.js: -------------------------------------------------------------------------------- 1 | 2 | import { routes } from "../routes/routes" 3 | import { PersonAdd, ViewStream, HomeOutlined } from '@mui/icons-material'; 4 | 5 | export const SIDEBAR_DATA = [ 6 | { 7 | name: 'home', 8 | title: 'Home', 9 | icon: HomeOutlined, 10 | activeIcon: '', 11 | path: routes.main.path, 12 | headerRow: true, 13 | }, 14 | { 15 | name: 'addemployee', 16 | title: 'Add Employee', 17 | icon: PersonAdd, 18 | activeIcon: '', 19 | path: routes.main.path, 20 | headerRow: false, 21 | }, 22 | { 23 | name: 'employees', 24 | title: 'Employees', 25 | icon: ViewStream, 26 | activeIcon: '', 27 | path: routes.main.path, 28 | headerRow: false, 29 | }, 30 | ]; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/home/Information.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { Box, Typography, styled } from '@mui/material'; 3 | 4 | const Wrapper = styled(Box)({ 5 | width: '500px', 6 | marginBottom: 20 7 | }) 8 | 9 | const Header = styled(Box)({ 10 | background: '#72bcd4', 11 | padding: '5px 10px', 12 | borderRadius: '10px 10px 0 0', 13 | '& > p': { 14 | color: '#FFFFFF', 15 | fontWeight: 600, 16 | fontSize: 14 17 | } 18 | }) 19 | 20 | const Information = ({ text, children }) => { 21 | 22 | return ( 23 | 24 | {text} 25 |
26 | Today ({new Date().toDateString()}) 27 |
28 | {children} 29 |
30 | ) 31 | } 32 | 33 | export default Information; -------------------------------------------------------------------------------- /crud-application/crud-app/src/App.js: -------------------------------------------------------------------------------- 1 | import AllUsers from './Component/AllUsers'; 2 | import AddUser from './Component/AddUser'; 3 | import EditUser from './Component/EditUser'; 4 | import NavBar from './Component/NavBar'; 5 | import NotFound from './Component/NotFound'; 6 | import CodeForInterview from './Component/CodeForInterview'; 7 | 8 | import { BrowserRouter, Route, Routes } from 'react-router-dom'; 9 | 10 | function App() { 11 | return ( 12 | 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | 21 | 22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /invoice-app/client/src/services/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const API_URL = 'http://localhost:8080'; 4 | 5 | export const getAllInvoices = async () => { 6 | try { 7 | return await axios.get(`${API_URL}/invoice`); 8 | } catch (error) { 9 | console.log('Error: ', error.message); 10 | return error.response.data; 11 | } 12 | } 13 | 14 | export const saveInvoice = async (payload) => { 15 | try { 16 | return await axios.post(`${API_URL}/invoice`, payload); 17 | } catch (error) { 18 | console.log('Error: ', error.message); 19 | return error.response.data; 20 | } 21 | } 22 | 23 | export const deleteInvoice = async (id) => { 24 | try { 25 | return await axios.delete(`${API_URL}/invoice/${id}`); 26 | } catch (error) { 27 | console.log('Error: ', error.message); 28 | return error.response.data; 29 | } 30 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/Dummy.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | import axios from 'axios'; // npm i axios 3 | 4 | // componentDidMount 5 | // componentDidUpdate 6 | 7 | const Dummy = () => { 8 | const [data, setData] = useState([]); 9 | 10 | useEffect(() => { 11 | const getData = async () => { 12 | // API call 13 | const response = await axios.get('https://jsonplaceholder.typicode.com/users'); 14 | setData(response.data); 15 | } 16 | getData(); 17 | }, []) 18 | 19 | return ( 20 |
21 | { 22 | data.map(obj => { 23 | return

{obj.name}

24 | }) 25 | } 26 |
27 | ) 28 | 29 | // forEach(String name: data) { 30 | // System.out.print(name); 31 | // } 32 | } 33 | 34 | export default Dummy; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/sidebar/SideBar.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { Drawer } from "@mui/material"; 3 | import SideBarContent from "./SideBarContent"; 4 | 5 | const SideBar = () => { 6 | 7 | return ( 8 | 26 | 27 | 28 | ) 29 | } 30 | 31 | export default SideBar; -------------------------------------------------------------------------------- /indeed-clone/client/src/components/Dropdown.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { FormControl, InputLabel, Select, MenuItem } from "@mui/material" 3 | 4 | const Dropdown = ({ 5 | id, 6 | value, 7 | handleChange, 8 | name, 9 | label, 10 | options, 11 | ...props 12 | }) => { 13 | return ( 14 | 15 | {label} 16 | 30 | 31 | ) 32 | } 33 | 34 | export default Dropdown -------------------------------------------------------------------------------- /quiz-application/client/src/components/Breadcrumb.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { breadcrumbItems as items } from '../constants/constant'; 3 | import styles from '../styles/breadcrumb.module.css'; 4 | 5 | const Breadcrumb = () => { 6 | 7 | const currentUrl = window.location.pathname; 8 | 9 | return ( 10 |
    11 | { 12 | items.map(item => ( 13 |
  • 20 | {item.label} 21 |
  • 22 | )) 23 | } 24 |
25 | ) 26 | } 27 | 28 | export default Breadcrumb; -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/pages/AllEmployees.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | import { Card, CardContent } from '@mui/material'; 3 | import { getAllEmployees } from '../service/api'; 4 | 5 | const AllEmployees = () => { 6 | const [employees, setEmployees] = useState([]); 7 | 8 | useEffect(() => { 9 | const getEmployeesData = async () => { 10 | const result = await getAllEmployees(); 11 | setEmployees(result); 12 | } 13 | getEmployeesData(); 14 | }, []) 15 | 16 | return ( 17 | <> 18 | { 19 | employees?.map(employee => ( 20 | 21 | 22 | Hello 23 | 24 | 25 | )) 26 | } 27 | 28 | ) 29 | } 30 | 31 | export default AllEmployees; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/model/PostModal.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.model; 2 | 3 | import jakarta.validation.constraints.NotEmpty; 4 | import jakarta.validation.constraints.NotNull; 5 | import lombok.Data; 6 | import org.springframework.data.annotation.CreatedDate; 7 | import org.springframework.data.annotation.Version; 8 | import org.springframework.data.mongodb.core.mapping.Document; 9 | 10 | import java.util.Date; 11 | 12 | @Document(collection = "posts") 13 | @Data 14 | public class PostModal { 15 | 16 | @NotNull 17 | @NotEmpty 18 | private String profile; 19 | 20 | @NotNull 21 | private String type; 22 | 23 | @NotNull 24 | private String description; 25 | 26 | @NotNull 27 | private String experience; 28 | 29 | @NotNull 30 | private String technology[]; 31 | 32 | @NotNull 33 | private String salary; 34 | 35 | @CreatedDate 36 | private Date createdAt; 37 | } 38 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/model/UserProfileModel.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.model; 2 | 3 | import jakarta.persistence.Column; 4 | import jakarta.persistence.Entity; 5 | import jakarta.persistence.Id; 6 | import jakarta.persistence.Table; 7 | import lombok.Data; 8 | import org.hibernate.annotations.CreationTimestamp; 9 | import org.hibernate.annotations.UpdateTimestamp; 10 | 11 | import java.sql.Timestamp; 12 | 13 | @Data 14 | @Entity 15 | @Table(name = "user_profile") 16 | public class UserProfileModel { 17 | 18 | @Id 19 | private Long phone; 20 | 21 | private String name; 22 | 23 | private String email; 24 | 25 | @CreationTimestamp 26 | @Column(name="create_timestamp", nullable=false, updatable = false) 27 | private Timestamp createTimestamp; 28 | 29 | @UpdateTimestamp 30 | @Column(name="update_timestamp") 31 | private Timestamp updateTimestamp; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/routes/routes.js: -------------------------------------------------------------------------------- 1 | import { lazy } from 'react'; 2 | 3 | const Main = lazy(() => import('../pages/Main')); 4 | const Home = lazy(() => import('../pages/Home')); 5 | const AddEmployee = lazy(() => import('../pages/AddEmployee')); 6 | const AllEmployees = lazy(() => import('../pages/AllEmployees')); 7 | const Dashboard = lazy(() => import('../pages/Dashboard')); 8 | 9 | const routes = { 10 | main: { 11 | path: '/ems', 12 | element: Main 13 | }, 14 | home: { 15 | path: 'home', 16 | element: Home 17 | }, 18 | dashboard: { 19 | path: 'dashboard', 20 | element: Dashboard, 21 | }, 22 | addemployee: { 23 | path: 'addemployee', 24 | element: AddEmployee 25 | }, 26 | allemployees: { 27 | path: 'employees', 28 | element: AllEmployees 29 | }, 30 | invalid: { 31 | path: '/ems/*', 32 | element: Main 33 | }, 34 | } 35 | 36 | export { routes }; -------------------------------------------------------------------------------- /quiz-application/client/src/services/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { API_URL } from '../constants/route'; 3 | 4 | export const fetchUserData = async (data) => { 5 | const headers = { phone: data.phone } 6 | 7 | try { 8 | const response = await axios.get(`${API_URL}/fetch-user-detail`, { headers: headers }); 9 | return response?.data; 10 | } catch (error) { 11 | console.log('Error while fetching user data', error.message); 12 | return error?.response?.data; 13 | } 14 | } 15 | 16 | export const saveUserData = async (payload) => { 17 | const headers = { phone: payload.phone } 18 | 19 | // payload = JSON.stringify(payload); 20 | 21 | try { 22 | const response = await axios.post(`${API_URL}/save-user-detail`, payload, { headers: headers }); 23 | return response?.data; 24 | } catch (error) { 25 | console.log('Error while fetching user data', error.message); 26 | return error.response.data; 27 | } 28 | } -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/services/InvoiceServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server.services; 2 | 3 | import com.invoiceprocessing.server.dao.InvoiceDao; 4 | import com.invoiceprocessing.server.model.Invoice; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.util.List; 9 | 10 | @Service 11 | public class InvoiceServiceImpl implements InvoiceService{ 12 | 13 | @Autowired 14 | InvoiceDao invoiceDao; 15 | 16 | @Override 17 | public Invoice addInvoice(Invoice invoice) { 18 | invoiceDao.save(invoice); 19 | return invoice; 20 | } 21 | 22 | @Override 23 | public List getInvoices() { 24 | return invoiceDao.findAll(); 25 | } 26 | 27 | @Override 28 | public Invoice deleteInvoice(long id) { 29 | Invoice invoice = invoiceDao.findById(id).get(); 30 | invoiceDao.delete(invoice); 31 | return invoice; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | crud-application/crud-app/node_modules 2 | crud-application/crud-app/package-lock.json 3 | crud-application/crud/.mvn 4 | crud-application/crud/.settings 5 | crud-application/crud/target 6 | crud-application/crud/.project 7 | crud-application/crud/.classpath 8 | job-portal 9 | employee-management-system/ems-service/.mvn 10 | employee-management-system/ems-service/.settings 11 | employee-management-system/ems-service/target 12 | employee-management-system/ems-service/.project 13 | employee-management-system/ems-service/.classpath 14 | invoice-app/server/.mvn 15 | invoice-app/server/.settings 16 | invoice-app/server/target 17 | invoice-app/server/.project 18 | invoice-app/server/.classpath 19 | indeed-clone/server/.mvn 20 | indeed-clone/server/.settings 21 | indeed-clone/server/target 22 | indeed-clone/server/.project 23 | indeed-clone/server/.classpath 24 | quiz-application/server/.mvn 25 | quiz-application/server/.settings 26 | quiz-application/server/target 27 | quiz-application/server/.project 28 | quiz-application/server/.classpath 29 | -------------------------------------------------------------------------------- /indeed-clone/client/src/components/Header.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { AppBar, Toolbar, styled } from "@mui/material"; 3 | import { routePath } from "../routes/route"; 4 | import { Link } from "react-router-dom"; 5 | 6 | const StyledAppBar = styled(AppBar)({ 7 | background: '#2d2d2d', 8 | height: 64, 9 | '& > div > *': { 10 | marginRight: 20, 11 | fontSize: 14, 12 | color: 'inherit', 13 | textDecoration: 'none' 14 | } 15 | }) 16 | 17 | const Header = () => { 18 | const logo = "https://get-staffed.com/wp-content/uploads/2020/07/indeed-logo.png"; 19 | 20 | return ( 21 | 22 | 23 | 24 | logo 25 | 26 | Post a job 27 | Find jobs 28 | 29 | 30 | ) 31 | } 32 | 33 | export default Header; -------------------------------------------------------------------------------- /quiz-application/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "axios": "^1.4.0", 10 | "react": "^18.2.0", 11 | "react-dom": "^18.2.0", 12 | "react-router-dom": "^6.14.2", 13 | "react-scripts": "5.0.1", 14 | "web-vitals": "^2.1.4" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "browserslist": { 29 | "production": [ 30 | ">0.2%", 31 | "not dead", 32 | "not op_mini all" 33 | ], 34 | "development": [ 35 | "last 1 chrome version", 36 | "last 1 firefox version", 37 | "last 1 safari version" 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/controller/InvoiceController.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server.controller; 2 | 3 | import com.invoiceprocessing.server.model.Invoice; 4 | import com.invoiceprocessing.server.services.InvoiceService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.*; 7 | 8 | import java.util.List; 9 | 10 | @RestController 11 | @CrossOrigin 12 | public class InvoiceController { 13 | 14 | @Autowired 15 | InvoiceService invoiceService; 16 | 17 | @PostMapping("/invoice") 18 | public Invoice addInvoice(@RequestBody Invoice invoice) { 19 | return this.invoiceService.addInvoice(invoice); 20 | } 21 | 22 | @GetMapping("/invoice") 23 | public List getInvoices() { 24 | return this.invoiceService.getInvoices(); 25 | } 26 | 27 | @DeleteMapping("/invoice/{invoiceId}") 28 | public Invoice deleteInvoice(@PathVariable String invoiceId) { 29 | return this.invoiceService.deleteInvoice(Long.parseLong(invoiceId)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/services/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud.services; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.springcrud.crud.dao.UserDao; 9 | import com.springcrud.crud.model.User; 10 | 11 | @Service 12 | public class UserServiceImpl implements UserService { 13 | 14 | @Autowired 15 | private UserDao userDao; 16 | 17 | @Override 18 | public List getUsers() { 19 | return userDao.findAll(); 20 | } 21 | 22 | @Override 23 | public User getUser(long userId) { 24 | return userDao.findById(userId).get(); 25 | } 26 | 27 | @Override 28 | public User addUser(User user) { 29 | userDao.save(user); 30 | return user; 31 | } 32 | 33 | @Override 34 | public User updateUser(User user) { 35 | userDao.save(user); 36 | return user; 37 | } 38 | 39 | @Override 40 | public User deleteUser(long userId) { 41 | User user = userDao.findById(userId).get(); 42 | userDao.delete(user); 43 | return user; 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/constants/CodeConstant.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.constants; 2 | 3 | public class CodeConstant { 4 | 5 | public static final int SYSTEM_ERROR_CODE = 500; 6 | 7 | public static final int BAD_REQUEST_CODE = 400; 8 | 9 | public static final int OK = 200; 10 | 11 | public static final int CONTENT_TYPE_NOT_SUPPORTED = 415; 12 | 13 | public static final int RESOURCE_ALREADY_EXIST = 409; 14 | 15 | public static final String SYSTEM_ERROR_STATUS = "System Error"; 16 | 17 | public static final String BAD_REQUEST_STATUS = "Bad Request"; 18 | 19 | public static final String SYSTEM_ERROR_MSG = "Something went wrong! Please check after sometime"; 20 | 21 | public static final String BAD_REQUEST_MSG = "Bad Request"; 22 | 23 | public static final String USER_ALREADY_EXIST = "USER ALREADY EXIST"; 24 | 25 | public static final String SAVE_USER_DETAIL_SUCCESS = "SAVE_USER_DETAIL_SUCCESS"; 26 | 27 | public static final String SUCCESS = "SUCCESS"; 28 | 29 | private static final String FAILURE = "FAILURE"; 30 | } 31 | -------------------------------------------------------------------------------- /invoice-app/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.11.1", 7 | "@emotion/styled": "^11.11.0", 8 | "@mui/material": "^5.13.6", 9 | "@testing-library/jest-dom": "^5.16.5", 10 | "@testing-library/react": "^13.4.0", 11 | "@testing-library/user-event": "^13.5.0", 12 | "axios": "^1.4.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-scripts": "5.0.1", 16 | "web-vitals": "^2.1.4" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { Box, Typography, styled } from '@mui/material'; 3 | 4 | import Information from '../components/home/Information'; 5 | 6 | const Wrapper = styled(Box)({ 7 | padding: '20px 50px' 8 | }) 9 | 10 | const Home = () => { 11 | return ( 12 | 13 | 16 | 17 | { 18 | 19 | } 20 | 21 | 22 | 25 | 26 | { 27 | 28 | } 29 | 30 | 31 | 34 | 35 | { 36 | 37 | } 38 | 39 | 40 | 41 | ) 42 | } 43 | 44 | export default Home; -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/service/PostServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.service; 2 | 3 | import com.indeed.server.dao.PostDao; 4 | import com.indeed.server.dto.PostDTO; 5 | import com.indeed.server.model.PostModal; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | 11 | @Service 12 | public class PostServiceImpl implements PostService{ 13 | 14 | @Autowired 15 | PostDao postDao; 16 | 17 | @Override 18 | public List getAllPosts() { 19 | return postDao.findAll(); 20 | } 21 | 22 | @Override 23 | public PostModal savePost(PostDTO postDTO) { 24 | PostModal postModal = new PostModal(); 25 | 26 | postModal.setProfile(postDTO.getProfile()); 27 | postModal.setType(postDTO.getType()); 28 | postModal.setSalary(postDTO.getSalary()); 29 | postModal.setExperience(postDTO.getExperience()); 30 | postModal.setDescription(postDTO.getDescription()); 31 | postModal.setTechnology(postDTO.getTechnology()); 32 | 33 | return postDao.save(postModal); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /indeed-clone/server/src/main/java/com/indeed/server/controller/PostController.java: -------------------------------------------------------------------------------- 1 | package com.indeed.server.controller; 2 | 3 | import com.indeed.server.constants.APIConstants; 4 | import com.indeed.server.dto.PostDTO; 5 | import com.indeed.server.model.PostModal; 6 | import com.indeed.server.service.PostService; 7 | import jakarta.validation.Valid; 8 | import lombok.RequiredArgsConstructor; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.List; 14 | 15 | @RestController 16 | @CrossOrigin 17 | @Slf4j 18 | @RequiredArgsConstructor 19 | public class PostController { 20 | 21 | 22 | final PostService postService; 23 | 24 | @GetMapping(APIConstants.GET_ALL_POSTS) 25 | public List getAllPosts() { 26 | log.info("Getting all the posts #####"); 27 | return this.postService.getAllPosts(); 28 | } 29 | 30 | @PostMapping(APIConstants.SAVE_POST) 31 | public PostModal savePost(@Valid @RequestBody PostDTO postDTORequest) { 32 | log.info("Saving post #####"); 33 | return this.postService.savePost(postDTORequest); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /indeed-clone/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.11.1", 7 | "@emotion/styled": "^11.11.0", 8 | "@mui/icons-material": "^5.14.1", 9 | "@mui/material": "^5.14.1", 10 | "@testing-library/jest-dom": "^5.17.0", 11 | "@testing-library/react": "^13.4.0", 12 | "@testing-library/user-event": "^13.5.0", 13 | "axios": "^1.4.0", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-router-dom": "^6.14.2", 17 | "react-scripts": "5.0.1", 18 | "web-vitals": "^2.1.4" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": [ 28 | "react-app", 29 | "react-app/jest" 30 | ] 31 | }, 32 | "browserslist": { 33 | "production": [ 34 | ">0.2%", 35 | "not dead", 36 | "not op_mini all" 37 | ], 38 | "development": [ 39 | "last 1 chrome version", 40 | "last 1 firefox version", 41 | "last 1 safari version" 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/service/impl/FileServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.service.impl; 2 | 3 | import com.example.emsservice.service.FileService; 4 | import org.springframework.stereotype.Service; 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import java.io.*; 8 | import java.nio.file.Files; 9 | import java.nio.file.Paths; 10 | import java.util.Date; 11 | 12 | @Service 13 | public class FileServiceImpl implements FileService { 14 | 15 | @Override 16 | public String uploadImage(String path, MultipartFile file) throws IOException { 17 | 18 | String name = file.getOriginalFilename(); 19 | 20 | // Full Path 21 | String filePath = path + name + new Date().getTime(); 22 | 23 | File newFile = new File(path); 24 | 25 | if (!newFile.exists()) { 26 | newFile.mkdir(); 27 | } 28 | 29 | Files.copy(file.getInputStream(), Paths.get(filePath)); 30 | 31 | return filePath; 32 | } 33 | 34 | @Override 35 | public InputStream getImageByImageName(String name, String path) throws FileNotFoundException { 36 | InputStream is = new FileInputStream(path + name); 37 | return is; 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ems-client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.10.6", 7 | "@emotion/styled": "^11.10.6", 8 | "@mui/icons-material": "^5.11.11", 9 | "@mui/material": "^5.11.13", 10 | "@reduxjs/toolkit": "^1.9.5", 11 | "@testing-library/jest-dom": "^5.16.5", 12 | "@testing-library/react": "^13.4.0", 13 | "@testing-library/user-event": "^13.5.0", 14 | "axios": "^1.3.4", 15 | "react": "^18.2.0", 16 | "react-dom": "^18.2.0", 17 | "react-router-dom": "^6.9.0", 18 | "react-scripts": "5.0.1", 19 | "web-vitals": "^2.1.4" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "build": "react-scripts build", 24 | "test": "react-scripts test", 25 | "eject": "react-scripts eject" 26 | }, 27 | "eslintConfig": { 28 | "extends": [ 29 | "react-app", 30 | "react-app/jest" 31 | ] 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.2%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 1 chrome version", 41 | "last 1 firefox version", 42 | "last 1 safari version" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /quiz-application/client/src/App.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import Home from './pages/Home'; 3 | import Login from './pages/Login'; 4 | import Quiz from './pages/Quiz'; 5 | import { BrowserRouter as Router, Routes, Route, Outlet, Navigate } from 'react-router-dom'; 6 | import { routePath } from './constants/route'; 7 | import BackgroundCanvas from './components/BackgroundCanvas'; 8 | import DataProvider from './context/DataProvider'; 9 | 10 | const PrivateRoute = ({ isAuthenticated }) => { 11 | return isAuthenticated ? : 12 | } 13 | 14 | function App() { 15 | const [isAuthenticated, isUserAuthenticated] = useState(false); 16 | 17 | return ( 18 | 19 | 20 | 21 | 22 | } /> 23 | } /> 24 | } /> 25 | 26 | } /> 27 | 28 | 29 | 30 | 31 | ); 32 | } 33 | 34 | export default App; 35 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/controller/QuestionController.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.controller; 2 | 3 | import com.quizapplication.server.constants.APIConstants; 4 | import com.quizapplication.server.model.QuestionModel; 5 | import com.quizapplication.server.service.QuestionService; 6 | import lombok.RequiredArgsConstructor; 7 | import org.springframework.http.ResponseEntity; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("question") 17 | @RequiredArgsConstructor 18 | public class QuestionController { 19 | 20 | final QuestionService questionService; 21 | 22 | @GetMapping(APIConstants.GET_ALL_QUESTIONS) 23 | public ResponseEntity> getAllQuestions() { 24 | return this.questionService.getAllQuestions(); 25 | } 26 | 27 | @GetMapping(APIConstants.GET_QUESTION_BY_CATEGORY + "/{category}") 28 | public ResponseEntity> getQuestionsByCategory(@PathVariable String category) { 29 | return this.questionService.getQuestionsByCategory(category.toLowerCase()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/EmsServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 8 | 9 | @SpringBootApplication 10 | public class EmsServiceApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(EmsServiceApplication.class, args); 14 | } 15 | 16 | @Bean 17 | public WebMvcConfigurer corsConfigurer() { 18 | return new WebMvcConfigurer() { 19 | @Override 20 | public void addCorsMappings(CorsRegistry registry) { 21 | registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE").allowedOrigins("*") 22 | .allowedHeaders("*"); 23 | } 24 | }; 25 | } 26 | 27 | // @Bean 28 | // public WebMvcConfigurer corsConfigurer() { 29 | // return new WebMvcConfigurerAdapter() { 30 | // @Override 31 | // public void addCorsMappings(CorsRegistry registry) { 32 | // registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE").allowedOrigins("*") 33 | // .allowedHeaders("*"); 34 | // } 35 | // }; 36 | // } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /crud-application/crud-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crud-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.9.0", 7 | "@emotion/styled": "^11.8.1", 8 | "@mui/material": "^5.6.3", 9 | "@testing-library/jest-dom": "^5.12.0", 10 | "@testing-library/react": "^11.2.6", 11 | "@testing-library/user-event": "^12.8.3", 12 | "axios": "^0.21.1", 13 | "concurrently": "^6.0.2", 14 | "json-server": "^0.16.3", 15 | "react": "^17.0.2", 16 | "react-dom": "^17.0.2", 17 | "react-router-dom": "^6.3.0", 18 | "react-scripts": "4.0.3", 19 | "web-vitals": "^1.1.1" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "json-server": "json-server --watch src/Database/db.json --host 127.0.0.1 --port 3002", 24 | "dev": "concurrently \"npm start\" \"npm run json-server\"", 25 | "build": "react-scripts build", 26 | "test": "react-scripts test", 27 | "eject": "react-scripts eject" 28 | }, 29 | "eslintConfig": { 30 | "extends": [ 31 | "react-app", 32 | "react-app/jest" 33 | ] 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.2%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/utils/CommonResponseEntity.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.utils; 2 | 3 | import com.quizapplication.server.constants.ApplicationConstants; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.stereotype.Service; 6 | 7 | import java.util.LinkedHashMap; 8 | 9 | @Service("commonResponseEntity") 10 | @Slf4j 11 | public class CommonResponseEntity { 12 | 13 | public LinkedHashMap ResponseEntityWithMap(Object status, Object msg, Object code) { 14 | LinkedHashMap map = new LinkedHashMap<>(); 15 | 16 | map.put(ApplicationConstants.REQUEST_STATUS, status); 17 | map.put(ApplicationConstants.RESPONSE_CODE, code); 18 | map.put(ApplicationConstants.RESPONSE_MSG, msg); 19 | 20 | log.info("RESULT ######" + map); 21 | 22 | return map; 23 | } 24 | 25 | public LinkedHashMap ResponseEntityWithMapAndData(Object status, Object msg, Object code, Object data) { 26 | LinkedHashMap map = new LinkedHashMap<>(); 27 | 28 | map.put(ApplicationConstants.REQUEST_STATUS, status); 29 | map.put(ApplicationConstants.RESPONSE_CODE, code); 30 | map.put(ApplicationConstants.RESPONSE_MSG, msg); 31 | map.put(ApplicationConstants.RESPONSE_DATA, data); 32 | 33 | log.info("RESULT ######" + map); 34 | 35 | return map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/header/Search.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | import SearchIcon from '@mui/icons-material/Search'; 3 | import { InputBase, List, ListItem, Box, styled } from '@mui/material'; 4 | import { Link } from 'react-router-dom'; 5 | 6 | const SearchContainer = styled(Box)` 7 | border-radius: 5px; 8 | margin-left: 10px; 9 | width: 40%; 10 | background-color: #F5F5F5; 11 | display: flex; 12 | `; 13 | 14 | const SearchIconWrapper = styled(Box)` 15 | padding: 5px; 16 | display: flex; 17 | color: #A9A9A9; 18 | `; 19 | 20 | const ListWrapper = styled(List)` 21 | position: absolute; 22 | color: #000; 23 | background: #FFFFFF; 24 | margin-top: 36px; 25 | `; 26 | 27 | const InputSearchBase = styled(InputBase)` 28 | width: 100%; 29 | padding-left: 5px; 30 | `; 31 | 32 | const Search = () => { 33 | const [text, setText] = useState(); 34 | const [open, setOpen] = useState(true) 35 | 36 | const getText = (text) => { 37 | setText(text); 38 | setOpen(false) 39 | } 40 | 41 | return ( 42 | 43 | 44 | 45 | 46 | getText(e.target.value)} 50 | /> 51 | 52 | ) 53 | } 54 | 55 | export default Search; -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/service/impl/EmployeeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.service.impl; 2 | 3 | import com.example.emsservice.model.Employee; 4 | import com.example.emsservice.repository.EmployeeRepo; 5 | import com.example.emsservice.service.EmployeeService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import java.util.List; 9 | 10 | @Service 11 | public class EmployeeServiceImpl implements EmployeeService { 12 | 13 | @Autowired 14 | private EmployeeRepo employeeRepo; 15 | 16 | @Override 17 | public Employee addEmployee(Employee employee) { 18 | employeeRepo.save(employee); 19 | return employee; 20 | } 21 | 22 | @Override 23 | public List getEmployees() { 24 | return employeeRepo.findAll(); 25 | } 26 | 27 | @Override 28 | public Employee getEmployee(long employeeId) { 29 | 30 | return employeeRepo.findById(employeeId).get(); 31 | } 32 | 33 | @Override 34 | public Employee updateEmployeeInfo(Employee employee) { 35 | employeeRepo.save(employee); 36 | return employee; 37 | } 38 | 39 | @Override 40 | public Employee deleteEmployeeInfo(long employeeId) { 41 | Employee employee = employeeRepo.findById(employeeId).get(); 42 | employeeRepo.delete(employee); 43 | 44 | return employee; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/controller/UserProfileController.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.controller; 2 | 3 | import com.quizapplication.server.constants.APIConstants; 4 | import com.quizapplication.server.dto.RequestHeaderDTO; 5 | import com.quizapplication.server.dto.UserProfileDTO; 6 | import com.quizapplication.server.service.UserProfileService; 7 | import com.quizapplication.server.utils.Utility; 8 | import jakarta.validation.Valid; 9 | import lombok.RequiredArgsConstructor; 10 | import lombok.extern.slf4j.Slf4j; 11 | import org.springframework.http.ResponseEntity; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.util.Map; 15 | 16 | @RestController 17 | @Slf4j 18 | @RequiredArgsConstructor 19 | @CrossOrigin 20 | public class UserProfileController { 21 | 22 | final UserProfileService userProfileService; 23 | 24 | 25 | @PostMapping(APIConstants.SAVE_USER_DETAIL) 26 | public ResponseEntity saveUserDetail(@RequestHeader Map requestHeaderMap, 27 | @Valid @RequestBody UserProfileDTO userProfileDTO) { 28 | 29 | log.info("SAVE USER DETAIL CONTROLLER ##### ", UserProfileController.class.getName()); 30 | 31 | RequestHeaderDTO requestHeaderDTO = Utility.getRequestHeaderDTO(requestHeaderMap); 32 | 33 | ResponseEntity response = userProfileService.saveUserData(userProfileDTO, requestHeaderDTO); 34 | 35 | return response; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /quiz-application/client/src/utils/common-utils.js: -------------------------------------------------------------------------------- 1 | import { MESSAGES } from "../constants/constant"; 2 | 3 | export const loginValidation = (data, error, setError) => { 4 | const { phone, name, email } = data; 5 | 6 | const numberRegrExp = /^[0-9]+$/; 7 | const letterRegrExp = /^[A-Za-z\s]+$/; 8 | const emailRegrExp = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/; 9 | 10 | const PHONE_LENGTH = 10; 11 | 12 | if (phone.trim().length !== PHONE_LENGTH) { 13 | setError({ ...error, phone: MESSAGES.invalidPhone }); 14 | return false; 15 | } else if (!numberRegrExp.test(phone.trim())) { 16 | setError({ ...error, phone: MESSAGES.invalidPhone }); 17 | return false; 18 | } else if (!validateNumberFirstCharacter(phone)) { 19 | setError({ ...error, phone: MESSAGES.invalidPhone }); 20 | return false; 21 | } 22 | 23 | if (name.trim().length < 3) { 24 | setError({ ...error, name: MESSAGES.invalidName }); 25 | return false; 26 | } else if (!letterRegrExp.test(name.trim())) { 27 | setError({ ...error, name: MESSAGES.invalidName }); 28 | return false; 29 | } 30 | 31 | if (!emailRegrExp.test(email.trim())) { 32 | setError({ ...error, email: MESSAGES.invalidEmail }); 33 | return false; 34 | } 35 | 36 | return true; 37 | } 38 | 39 | const validateNumberFirstCharacter = (phone) => { 40 | const numFirst = Number(String(phone).charAt(0)); 41 | return (numFirst === 6 || numFirst === 7 || numFirst === 8 || numFirst === 9); 42 | } -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/service/impl/QuestionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.service.impl; 2 | 3 | import com.quizapplication.server.dao.QuestionDao; 4 | import com.quizapplication.server.model.QuestionModel; 5 | import com.quizapplication.server.service.QuestionService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.http.HttpStatus; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | @Service 15 | public class QuestionServiceImpl implements QuestionService { 16 | 17 | @Autowired 18 | QuestionDao questionDao; 19 | 20 | @Override 21 | public ResponseEntity> getAllQuestions() { 22 | try { 23 | return new ResponseEntity<>(questionDao.findAll(), HttpStatus.OK); 24 | } catch (Exception e) { 25 | e.printStackTrace(); 26 | } 27 | return new ResponseEntity<>(new ArrayList<>(), HttpStatus.BAD_REQUEST); 28 | } 29 | 30 | @Override 31 | public ResponseEntity> getQuestionsByCategory(String category) { 32 | try { 33 | return new ResponseEntity<>(questionDao.findByCategory(category), HttpStatus.OK); 34 | } catch (Exception e) { 35 | e.printStackTrace(); 36 | } 37 | return new ResponseEntity<>(new ArrayList<>(), HttpStatus.BAD_REQUEST); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/controller/EmployeeController.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.controller; 2 | 3 | import com.example.emsservice.model.Employee; 4 | import com.example.emsservice.service.EmployeeService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.*; 7 | import java.util.List; 8 | 9 | @RestController 10 | public class EmployeeController extends Employee { 11 | 12 | @Autowired 13 | private EmployeeService employeeService; 14 | 15 | @PostMapping("/employee") 16 | public Employee addEmployee(@RequestBody Employee employee) { 17 | 18 | return this.employeeService.addEmployee(employee); 19 | } 20 | 21 | @GetMapping("/employees") 22 | public List getEmployees() { 23 | System.out.println("Hello"); 24 | return this.employeeService.getEmployees(); 25 | } 26 | 27 | @GetMapping("employee/{employeeId}") 28 | public Employee getEmployee(@PathVariable String employeeId){ 29 | return this.employeeService.getEmployee(Long.parseLong(employeeId)); 30 | } 31 | 32 | @PutMapping("employee") 33 | public Employee updateEmployeeInfo(Employee employee) { 34 | 35 | return this.employeeService.updateEmployeeInfo(employee); 36 | } 37 | 38 | @DeleteMapping("employee/{employeeId}") 39 | public Employee deleteEmployeeInfo(@PathVariable String employeeId) { 40 | return this.employeeService.deleteEmployeeInfo(Long.parseLong(employeeId)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/App.js: -------------------------------------------------------------------------------- 1 | import { Suspense, lazy } from 'react'; 2 | import Dummy from './Dummy'; 3 | import SuspenseLoader from './components/common/SuspenseLoader'; 4 | import { RouterProvider, createBrowserRouter, createRoutesFromElements, Route, Navigate } from 'react-router-dom'; 5 | import { routes } from './routes/routes'; 6 | import ErrorComponent from './components/common/ErrorComponent'; 7 | 8 | const router = createBrowserRouter( 9 | createRoutesFromElements( 10 | 11 | 12 | } /> 13 | } > 14 | } errorElement={} /> 15 | } errorElement={} /> 16 | } errorElement={} /> 17 | } errorElement={} /> 18 | 19 | 20 | } /> 21 | 22 | 23 | ) 24 | ) 25 | 26 | const App = () => { 27 | return ( 28 | } > 29 | 30 | 31 | ) 32 | } 33 | 34 | export default App; -------------------------------------------------------------------------------- /crud-application/crud/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.7.0 9 | 10 | 11 | com.springcrud 12 | crud 13 | 0.0.1-SNAPSHOT 14 | crud 15 | Demo project for Spring Boot 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | mysql 31 | mysql-connector-java 32 | runtime 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud.controller; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.DeleteMapping; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.PutMapping; 12 | import org.springframework.web.bind.annotation.RequestBody; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import com.springcrud.crud.model.User; 16 | import com.springcrud.crud.services.UserService; 17 | 18 | 19 | @RestController 20 | @CrossOrigin 21 | public class UserController { 22 | 23 | @Autowired 24 | private UserService userService; 25 | 26 | @PostMapping("/user") 27 | public User addUser(@RequestBody User user) { 28 | return this.userService.addUser(user); 29 | } 30 | 31 | @GetMapping("/users") 32 | public List getUsers() { 33 | return this.userService.getUsers(); 34 | } 35 | 36 | @GetMapping("/users/{userId}") 37 | public User getUser(@PathVariable String userId) { 38 | return this.userService.getUser(Long.parseLong(userId)); 39 | } 40 | 41 | @PutMapping("/user") 42 | public User updateUser(@RequestBody User user) { 43 | return this.userService.updateUser(user); 44 | } 45 | 46 | @DeleteMapping("/user/{userId}") 47 | public User deleteUser(@PathVariable String userId){ 48 | return this.userService.deleteUser(Long.parseLong(userId)); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /invoice-app/server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.2 9 | 10 | 11 | com.invoiceprocessing 12 | server 13 | 0.0.1-SNAPSHOT 14 | server 15 | Demo project for Spring Boot 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | com.mysql 31 | mysql-connector-j 32 | runtime 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /crud-application/crud/src/main/java/com/springcrud/crud/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springcrud.crud.model; 2 | 3 | 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | @Entity 11 | public class User { 12 | 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.AUTO) 15 | private Long id; 16 | private String name; 17 | private String username; 18 | private String email; 19 | private String phone; 20 | 21 | public User() { } 22 | 23 | public User(Long id, String name, String username, String email, String phone) { 24 | super(); 25 | this.id = id; 26 | this.name = name; 27 | this.username = username; 28 | this.email = email; 29 | this.phone = phone; 30 | } 31 | 32 | public Long getId() { 33 | return id; 34 | } 35 | 36 | public void setId(Long id) { 37 | this.id = id; 38 | } 39 | 40 | public String getName() { 41 | return name; 42 | } 43 | 44 | public void setName(String name) { 45 | this.name = name; 46 | } 47 | 48 | public String getUsername() { 49 | return username; 50 | } 51 | 52 | public void setUsername(String username) { 53 | this.username = username; 54 | } 55 | 56 | public String getEmail() { 57 | return email; 58 | } 59 | 60 | public void setEmail(String email) { 61 | this.email = email; 62 | } 63 | 64 | public String getPhone() { 65 | return phone; 66 | } 67 | 68 | public void setPhone(String phone) { 69 | this.phone = phone; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | return "User [id=" + id + ", name=" + name + ", username=" + username + ", email=" + email + ", phone=" + phone 75 | + "]"; 76 | } 77 | 78 | } -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/components/sidebar/SideBarContent.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { List, ListItem, Divider, styled } from '@mui/material'; 4 | import { SIDEBAR_DATA } from '../../config/sidebar.config'; 5 | import { NavLink, useParams } from 'react-router-dom'; 6 | import { routes } from '../../routes/routes'; 7 | 8 | const StyledDivider = styled(Divider)({ 9 | width: '80%', 10 | color: '#FFF', 11 | backgroundColor: '#FFFFFF', 12 | margin: 12 13 | }) 14 | 15 | const SideBarContent = () => { 16 | 17 | const { type } = useParams(); 18 | console.log(type); 19 | return ( 20 | 21 | { 22 | SIDEBAR_DATA.map(data => { 23 | return ( 24 | <> 25 | 30 | 34 | 35 | {data.title} 36 | 37 | 38 | { data.headerRow && } 39 | 40 | ) 41 | }) 42 | } 43 | 44 | ) 45 | } 46 | 47 | export default SideBarContent; -------------------------------------------------------------------------------- /indeed-clone/server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.2 9 | 10 | 11 | com.indeed 12 | server 13 | 0.0.1-SNAPSHOT 14 | server 15 | Demo project for Spring Boot 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-mongodb 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | org.projectlombok 30 | lombok 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-validation 35 | 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | 44 | 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-maven-plugin 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/controller/FileController.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.controller; 2 | 3 | import com.example.emsservice.service.FileService; 4 | import jakarta.servlet.http.HttpServletResponse; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.util.StreamUtils; 9 | import org.springframework.web.bind.annotation.*; 10 | import org.springframework.web.multipart.MultipartFile; 11 | import java.io.IOException; 12 | import java.io.InputStream; 13 | 14 | @RestController 15 | @RequestMapping("/file") 16 | public class FileController { 17 | 18 | @Autowired 19 | private FileService fileService; 20 | 21 | @Value("${project.image}") 22 | private String path; 23 | 24 | private String prePath = "http://localhost:8080/file"; 25 | 26 | @PostMapping("/upload") 27 | public String fileUpload(MultipartFile file) { 28 | String filePath; 29 | try { 30 | filePath = this.fileService.uploadImage(path, file); 31 | } catch (Exception e) { 32 | e.printStackTrace(); 33 | return "Image is not uploaded"; 34 | } 35 | 36 | return prePath + "/" + filePath; 37 | } 38 | 39 | @GetMapping(value = "/images/{name}", produces = MediaType.IMAGE_JPEG_VALUE) 40 | public void getImageInfoByName(@PathVariable("name") String name, HttpServletResponse response) throws IOException { 41 | System.out.println(name); 42 | 43 | InputStream image = this.fileService.getImageByImageName(name, path); 44 | System.out.println(image); 45 | response.setContentType(MediaType.IMAGE_JPEG_VALUE); 46 | StreamUtils.copy(image, response.getOutputStream()); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /indeed-clone/client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /quiz-application/client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /crud-application/crud-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /invoice-app/client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | Invoice Processing System 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /invoice-app/server/src/main/java/com/invoiceprocessing/server/model/Invoice.java: -------------------------------------------------------------------------------- 1 | package com.invoiceprocessing.server.model; 2 | 3 | import jakarta.persistence.Entity; 4 | import jakarta.persistence.GeneratedValue; 5 | import jakarta.persistence.GenerationType; 6 | import jakarta.persistence.Id; 7 | 8 | @Entity 9 | public class Invoice { 10 | @Id 11 | @GeneratedValue(strategy = GenerationType.AUTO) 12 | private long id; 13 | private String vendor; 14 | private String product; 15 | private int amount; 16 | private String date; 17 | private String action; 18 | 19 | public Invoice() {} 20 | 21 | public Invoice(long id, String vendor, String product, int amount, String date, String action) { 22 | this.id = id; 23 | this.vendor = vendor; 24 | this.product = product; 25 | this.amount = amount; 26 | this.date = date; 27 | this.action = action; 28 | } 29 | 30 | public long getId() { 31 | return id; 32 | } 33 | 34 | public void setId(long id) { 35 | this.id = id; 36 | } 37 | 38 | public String getVendor() { 39 | return vendor; 40 | } 41 | 42 | public void setVendor(String vendor) { 43 | this.vendor = vendor; 44 | } 45 | 46 | public String getProduct() { 47 | return product; 48 | } 49 | 50 | public void setProduct(String product) { 51 | this.product = product; 52 | } 53 | 54 | public int getAmount() { 55 | return amount; 56 | } 57 | 58 | public void setAmount(int amount) { 59 | this.amount = amount; 60 | } 61 | 62 | public String getDate() { 63 | return date; 64 | } 65 | 66 | public void setDate(String date) { 67 | this.date = date; 68 | } 69 | 70 | public String getAction() { 71 | return action; 72 | } 73 | 74 | public void setAction(String action) { 75 | this.action = action; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /indeed-clone/client/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | import Header from '../components/Header'; 4 | import { Box, Typography, Button, styled } from '@mui/material'; 5 | import { useNavigate } from 'react-router-dom'; 6 | import { routePath } from '../routes/route'; 7 | 8 | const Component = styled(Box)({ 9 | display: 'flex', 10 | height: '100vh', 11 | alignItems: 'center', 12 | margin: '0 110px', 13 | '& > div': { 14 | width: '50%', 15 | display: 'flex', 16 | justifyContent: 'center', 17 | '& > div > p': { 18 | fontSize: 56, 19 | lineHeight: 1.25, 20 | letterSpacing: -1 21 | }, 22 | '& > div > button': { 23 | width: 220, 24 | height: 60, 25 | background: 'rgb(37, 87, 167)', 26 | textTransform: 'none', 27 | fontSize: 16, 28 | fontWeight: 700, 29 | marginTop: 48 30 | } 31 | } 32 | }) 33 | 34 | const Home = () => { 35 | const navigate = useNavigate(); 36 | 37 | const animatedImage = "https://images.ctfassets.net/pdf29us7flmy/5r34jiS1YfJuoRzqp3XH6y/6fba6547e16cd0ad08ae28dad306015d/Screen_Shot_2023-01-11_at_9.21.31_AM.png?w=720&q=100&fm=avif"; 38 | 39 | return ( 40 | <> 41 |
42 | 43 | 44 | 45 | Let's make your next
great hire. Fast.
46 | 50 |
51 |
52 | 53 | homeimage 54 | 55 |
56 | 57 | ) 58 | } 59 | 60 | export default Home; -------------------------------------------------------------------------------- /employee-management-system/ems-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.0.4 9 | 10 | 11 | com.example 12 | ems-service 13 | 0.0.1-SNAPSHOT 14 | ems-service 15 | EMS Services in Spring Boot 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | 34 | com.mysql 35 | mysql-connector-j 36 | runtime 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | org.springframework.boot 54 | spring-boot-maven-plugin 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /invoice-app/client/src/components/Invoices.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { TableCell, Table, TableHead, TableRow, TableBody, Button, Typography, styled } from '@mui/material'; 3 | 4 | const StyledTable = styled(Table)({ 5 | margin: 20, 6 | marginTop: 40, 7 | width: '80%', 8 | '& > thead > tr > th': { 9 | background: '#000', 10 | color: '#FFFFFF', 11 | fontSize: 18 12 | }, 13 | '& > tbody > tr > td': { 14 | fontSize: 16 15 | }, 16 | '& > tbody > p': { 17 | fontSize: 18, 18 | marginTop: 15 19 | } 20 | }) 21 | 22 | const Invoices = ({ invoices, removeInvoice }) => { 23 | return ( 24 | 25 | 26 | 27 | Vendor 28 | Product 29 | Amount 30 | Date 31 | Status 32 | Action 33 | 34 | 35 | 36 | { 37 | invoices && Array.isArray(invoices) && invoices.length > 0 ? 38 | invoices.map(invoice => ( 39 | 40 | {invoice.vendor} 41 | {invoice.product} 42 | Rs {invoice.amount} 43 | {invoice.date} 44 | {invoice.action} 45 | 46 | 47 | )) 48 | : 49 | No pending invoices 50 | } 51 | 52 | 53 | ) 54 | } 55 | 56 | export default Invoices; -------------------------------------------------------------------------------- /quiz-application/server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.2 9 | 10 | 11 | com.quizapplication 12 | server 13 | 0.0.1-SNAPSHOT 14 | server 15 | Demo project for Spring Boot 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | com.mysql 31 | mysql-connector-j 32 | runtime 33 | 34 | 35 | org.projectlombok 36 | lombok 37 | true 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-starter-test 42 | test 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-starter-validation 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-maven-plugin 56 | 57 | 58 | 59 | org.projectlombok 60 | lombok 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/AddUser.jsx: -------------------------------------------------------------------------------- 1 | import react, { useState } from 'react'; 2 | import { FormGroup, FormControl, InputLabel, Input, Button, styled, Typography } from '@mui/material'; 3 | import { addUser } from '../Service/api'; 4 | import { useNavigate } from 'react-router-dom'; 5 | 6 | const initialValue = { 7 | name: '', 8 | username: '', 9 | email: '', 10 | phone: '' 11 | } 12 | 13 | const Container = styled(FormGroup)` 14 | width: 50%; 15 | margin: 5% 0 0 25%; 16 | & > div { 17 | margin-top: 20px; 18 | `; 19 | 20 | const AddUser = () => { 21 | const [user, setUser] = useState(initialValue); 22 | const { name, username, email, phone } = user; 23 | let navigate = useNavigate(); 24 | 25 | const onValueChange = (e) => { 26 | setUser({...user, [e.target.name]: e.target.value}) 27 | } 28 | 29 | const addUserDetails = async() => { 30 | await addUser(user); 31 | navigate('/all'); 32 | } 33 | 34 | return ( 35 | 36 | Add User 37 | 38 | Name 39 | onValueChange(e)} name='name' value={name} id="my-input" /> 40 | 41 | 42 | Username 43 | onValueChange(e)} name='username' value={username} id="my-input" /> 44 | 45 | 46 | Email 47 | onValueChange(e)} name='email' value={email} id="my-input"/> 48 | 49 | 50 | Phone 51 | onValueChange(e)} name='phone' value={phone} id="my-input" /> 52 | 53 | 54 | 55 | 56 | 57 | ) 58 | } 59 | 60 | export default AddUser; -------------------------------------------------------------------------------- /quiz-application/server/src/main/java/com/quizapplication/server/service/impl/UserProfileServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.quizapplication.server.service.impl; 2 | 3 | import com.quizapplication.server.constants.CodeConstant; 4 | import com.quizapplication.server.dao.UserProfileDao; 5 | import com.quizapplication.server.dto.RequestHeaderDTO; 6 | import com.quizapplication.server.dto.UserProfileDTO; 7 | import com.quizapplication.server.model.UserProfileModel; 8 | import com.quizapplication.server.service.UserProfileService; 9 | import com.quizapplication.server.utils.CommonResponseEntity; 10 | import jakarta.validation.Valid; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.http.HttpStatus; 13 | import org.springframework.http.ResponseEntity; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.LinkedHashMap; 17 | 18 | @Service 19 | public class UserProfileServiceImpl implements UserProfileService { 20 | 21 | @Autowired 22 | UserProfileDao userProfileDao; 23 | 24 | @Autowired 25 | CommonResponseEntity commonResponseEntity; 26 | 27 | @Override 28 | public ResponseEntity saveUserData(@Valid UserProfileDTO userProfileDTO, RequestHeaderDTO requestHeaderDTO) { 29 | boolean isUserAlreadyExist = false; 30 | String message = ""; 31 | LinkedHashMap data = null; 32 | 33 | UserProfileModel userProfileModel = userProfileDao.findByPhone(userProfileDTO.getPhone()); 34 | 35 | if (userProfileModel != null) { 36 | isUserAlreadyExist = true; 37 | } 38 | 39 | if (userProfileModel == null) { 40 | userProfileModel = new UserProfileModel(); 41 | 42 | userProfileModel.setPhone(userProfileDTO.getPhone()); 43 | userProfileModel.setName(userProfileDTO.getName()); 44 | userProfileModel.setEmail(userProfileDTO.getEmail()); 45 | } 46 | 47 | userProfileDao.saveAndFlush(userProfileModel); 48 | 49 | message = isUserAlreadyExist ? CodeConstant.USER_ALREADY_EXIST : CodeConstant.SAVE_USER_DETAIL_SUCCESS; 50 | 51 | data = commonResponseEntity.ResponseEntityWithMap(CodeConstant.SUCCESS, message, 52 | isUserAlreadyExist ? CodeConstant.RESOURCE_ALREADY_EXIST : CodeConstant.OK); 53 | 54 | return new ResponseEntity(data, HttpStatus.OK); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/AllUsers.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | 3 | import { Table, TableHead, TableCell, TableRow, TableBody, Button, styled } from '@mui/material' 4 | import { getUsers, deleteUser } from '../Service/api'; 5 | import { Link } from 'react-router-dom'; 6 | 7 | const StyledTable = styled(Table)` 8 | width: 90%; 9 | margin: 50px 0 0 50px; 10 | `; 11 | 12 | const THead = styled(TableRow)` 13 | & > th { 14 | font-size: 20px; 15 | background: #000000; 16 | color: #FFFFFF; 17 | } 18 | `; 19 | 20 | const TRow = styled(TableRow)` 21 | & > td{ 22 | font-size: 18px 23 | } 24 | `; 25 | 26 | 27 | const AllUsers = () => { 28 | const [users, setUsers] = useState([]); 29 | 30 | useEffect(() => { 31 | getAllUsers(); 32 | }, []); 33 | 34 | const deleteUserData = async (id) => { 35 | await deleteUser(id); 36 | getAllUsers(); 37 | } 38 | 39 | const getAllUsers = async () => { 40 | let response = await getUsers(); 41 | setUsers(response.data); 42 | } 43 | 44 | return ( 45 | 46 | 47 | 48 | Id 49 | Name 50 | Username 51 | Email 52 | Phone 53 | 54 | 55 | 56 | 57 | {users.map((user) => ( 58 | 59 | {user.id} 60 | {user.name} 61 | {user.username} 62 | {user.email} 63 | {user.phone} 64 | 65 | 66 | 67 | 68 | 69 | ))} 70 | 71 | 72 | ) 73 | } 74 | 75 | export default AllUsers; -------------------------------------------------------------------------------- /invoice-app/client/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /invoice-app/client/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | import Header from '../components/Header'; 3 | import { Box, Typography, styled, Button } from '@mui/material'; 4 | import Invoices from '../components/Invoices'; 5 | import AddInvoice from "../components/AddInvoice"; 6 | import { getAllInvoices, deleteInvoice } from "../services/api"; 7 | 8 | const Component = styled(Box)` 9 | width: 80%; 10 | margin: 50px auto; 11 | & > h4 { 12 | margin-bottom: 20px; 13 | } 14 | & > thead { 15 | background-color: #000; 16 | } 17 | & > th { 18 | color: #FFFFFF; 19 | font-weight: 600; 20 | font-size: 16px; 21 | } 22 | & > td { 23 | font-size: 16px; 24 | } 25 | ` 26 | 27 | const defaultObj = { 28 | id: '', 29 | vendor: '', 30 | product: '', 31 | amount: '', 32 | date: '' 33 | } 34 | 35 | const Home = () => { 36 | const [invoices, setInvoices] = useState([]); 37 | const [addInvoice, setAddInvoice] = useState(false); 38 | 39 | useEffect(() => { 40 | const getData = async() => { 41 | const response = await getAllInvoices(); 42 | response && response.data && setInvoices(response.data); 43 | } 44 | getData(); 45 | }, [addInvoice]); 46 | 47 | const removeInvoice = async (id) => { 48 | await deleteInvoice(id); 49 | 50 | const updatedInvoices = invoices.filter(invoice => invoice.id != id); 51 | setInvoices(updatedInvoices); 52 | } 53 | 54 | const toggleInvoice = () => { 55 | setAddInvoice(true); 56 | } 57 | 58 | return ( 59 | <> 60 |
61 | 62 | Pending Invoices 63 | { 64 | !addInvoice && 65 | 70 | } 71 | { 72 | addInvoice && 73 | } 74 | 75 | 79 | 80 | 81 | 82 | ) 83 | } 84 | 85 | export default Home; -------------------------------------------------------------------------------- /indeed-clone/client/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quiz-application/client/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crud-application/crud-app/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /invoice-app/client/src/components/AddInvoice.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { TextField, Typography, Box, Button, styled } from "@mui/material"; 3 | import { saveInvoice } from "../services/api"; 4 | 5 | const Component = styled(Box)({ 6 | marginTop: 20, 7 | '& > p': { 8 | fontSize: 26, 9 | marginBottom: 10 10 | }, 11 | '& > div > div': { 12 | marginRight: 20, 13 | minWidth: 200 14 | } 15 | }) 16 | 17 | const defaultObj = { 18 | vendor: '', 19 | product: '', 20 | amount: 0, 21 | date: '', 22 | action: 'pending' 23 | } 24 | 25 | const AddInvoice = ({ setAddInvoice }) => { 26 | const [invoice, setInvoice] = useState(defaultObj); 27 | 28 | const onValueChange = (e) => { 29 | setInvoice({ ...invoice, [e.target.name]: e.target.value }) 30 | } 31 | 32 | const addNewInvoice = async () => { 33 | await saveInvoice({ ...invoice, amount: Number(invoice['amount']) }); 34 | 35 | setAddInvoice(false); 36 | } 37 | 38 | return ( 39 | 40 | Add Invoice 41 | 42 | onValueChange(e)} 47 | autoComplete="off" 48 | /> 49 | onValueChange(e)} 54 | autoComplete="off" 55 | /> 56 | onValueChange(e)} 61 | type="number" 62 | autoComplete="off" 63 | /> 64 | onValueChange(e)} 69 | type="date" 70 | autoComplete="off" 71 | /> 72 | 76 | 77 | 78 | ) 79 | } 80 | 81 | export default AddInvoice; -------------------------------------------------------------------------------- /crud-application/crud-app/src/Component/EditUser.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | 3 | import { FormGroup, FormControl, InputLabel, Input, Button, styled, Typography } from '@mui/material'; 4 | import { useNavigate, useParams } from 'react-router-dom'; 5 | import { getUsers, editUser } from '../Service/api'; 6 | 7 | const initialValue = { 8 | name: '', 9 | username: '', 10 | email: '', 11 | phone: '' 12 | } 13 | 14 | const Container = styled(FormGroup)` 15 | width: 50%; 16 | margin: 5% 0 0 25%; 17 | & > div { 18 | margin-top: 20px 19 | `; 20 | 21 | 22 | const EditUser = () => { 23 | const [user, setUser] = useState(initialValue); 24 | const { name, username, email, phone } = user; 25 | const { id } = useParams(); 26 | 27 | let navigate = useNavigate(); 28 | 29 | useEffect(() => { 30 | loadUserDetails(); 31 | }, []); 32 | 33 | const loadUserDetails = async() => { 34 | const response = await getUsers(id); 35 | setUser(response.data); 36 | } 37 | 38 | const editUserDetails = async() => { 39 | const response = await editUser(id, user); 40 | navigate('/all'); 41 | } 42 | 43 | const onValueChange = (e) => { 44 | console.log(e.target.value); 45 | setUser({...user, [e.target.name]: e.target.value}) 46 | } 47 | 48 | return ( 49 | 50 | Edit Information 51 | 52 | Name 53 | onValueChange(e)} name='name' value={name} id="my-input" aria-describedby="my-helper-text" /> 54 | 55 | 56 | Username 57 | onValueChange(e)} name='username' value={username} id="my-input" aria-describedby="my-helper-text" /> 58 | 59 | 60 | Email 61 | onValueChange(e)} name='email' value={email} id="my-input" aria-describedby="my-helper-text" /> 62 | 63 | 64 | Phone 65 | onValueChange(e)} name='phone' value={phone} id="my-input" aria-describedby="my-helper-text" /> 66 | 67 | 68 | 69 | 70 | 71 | ) 72 | } 73 | 74 | export default EditUser; -------------------------------------------------------------------------------- /employee-management-system/ems-service/src/main/java/com/example/emsservice/model/Employee.java: -------------------------------------------------------------------------------- 1 | package com.example.emsservice.model; 2 | 3 | import jakarta.persistence.Entity; 4 | import jakarta.persistence.GeneratedValue; 5 | import jakarta.persistence.GenerationType; 6 | import jakarta.persistence.Id; 7 | 8 | @Entity 9 | public class Employee { 10 | 11 | @Id 12 | @GeneratedValue(strategy = GenerationType.AUTO) 13 | private long employeeId; 14 | private String name; 15 | private String email; 16 | private String phone; 17 | private String designation; 18 | private String employmentType; 19 | private String workLocation; 20 | private String employmentStatus; 21 | private String noOfWorkingDays; 22 | 23 | public Employee() { 24 | 25 | } 26 | 27 | public Employee(long employeeId, String name, String email, String phone, String designation, String employmentType, String workLocation, String employmentStatus, String noOfWorkingDays) { 28 | this.employeeId = employeeId; 29 | this.name = name; 30 | this.email = email; 31 | this.phone = phone; 32 | this.designation = designation; 33 | this.employmentType = employmentType; 34 | this.workLocation = workLocation; 35 | this.employmentStatus = employmentStatus; 36 | this.noOfWorkingDays = noOfWorkingDays; 37 | } 38 | 39 | public long getEmployeeId() { 40 | return employeeId; 41 | } 42 | 43 | public void setEmployeeId(long employeeId) { 44 | this.employeeId = employeeId; 45 | } 46 | 47 | public String getName() { 48 | return name; 49 | } 50 | 51 | public void setName(String name) { 52 | this.name = name; 53 | } 54 | 55 | public String getEmail() { 56 | return email; 57 | } 58 | 59 | public void setEmail(String email) { 60 | this.email = email; 61 | } 62 | 63 | public String getPhone() { 64 | return phone; 65 | } 66 | 67 | public void setPhone(String phone) { 68 | this.phone = phone; 69 | } 70 | 71 | public String getDesignation() { 72 | return designation; 73 | } 74 | 75 | public void setDesignation(String designation) { 76 | this.designation = designation; 77 | } 78 | 79 | public String getEmploymentType() { 80 | return employmentType; 81 | } 82 | 83 | public void setEmploymentType(String employmentType) { 84 | this.employmentType = employmentType; 85 | } 86 | 87 | public String getWorkLocation() { 88 | return workLocation; 89 | } 90 | 91 | public void setWorkLocation(String workLocation) { 92 | this.workLocation = workLocation; 93 | } 94 | 95 | public String getEmploymentStatus() { 96 | return employmentStatus; 97 | } 98 | 99 | public void setEmploymentStatus(String employmentStatus) { 100 | this.employmentStatus = employmentStatus; 101 | } 102 | 103 | public String getNoOfWorkingDays() { 104 | return noOfWorkingDays; 105 | } 106 | 107 | public void setNoOfWorkingDays(String noOfWorkingDays) { 108 | this.noOfWorkingDays = noOfWorkingDays; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /invoice-app/client/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /crud-application/crud-app/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /indeed-clone/client/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /quiz-application/client/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /employee-management-system/ems-client/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /indeed-clone/client/src/pages/AllPosts.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react'; 2 | import { Box, InputBase, Button, styled, Card, CardContent, Typography } from '@mui/material'; 3 | import { Search as SearchIcon } from '@mui/icons-material'; 4 | import Header from '../components/Header'; 5 | import { getAllPosts } from '../services/api'; 6 | 7 | const SearchContainer = styled(Box)({ 8 | marginTop: 74, 9 | display: 'flex', 10 | justifyContent: 'center', 11 | '& > div': { 12 | width: 500, 13 | height: 45, 14 | border: '1px solid #767676', 15 | borderRadius: 10, 16 | display: 'flex', 17 | alignItems: 'center', 18 | marginRight: 20 19 | }, 20 | '& > div > div': { 21 | width: '85%', 22 | margin: '0 20px' 23 | } 24 | }) 25 | 26 | const FindButton = styled(Button)({ 27 | background: '#2557a7', 28 | textTransform: 'none', 29 | height: 45, 30 | borderRadius: 10, 31 | width: 100 32 | }) 33 | 34 | const PostWrapper = styled(Box)({ 35 | display: 'flex', 36 | flexWrap: 'wrap', 37 | justifyContent: 'center', 38 | marginTop: 50, 39 | '& > div': { 40 | border: '1px solid #d4d2d0', 41 | borderRadius: 10, 42 | margin: 10, 43 | width: '30%', 44 | height: 300, 45 | } 46 | }) 47 | 48 | const AllPosts = () => { 49 | 50 | const [posts, setPosts] = useState([]); 51 | const [text, setText] = useState(""); 52 | 53 | useEffect(() => { 54 | const getData = async () => { 55 | const response = await getAllPosts(); 56 | setPosts(response.data); 57 | } 58 | getData(); 59 | }, []) 60 | 61 | return ( 62 | <> 63 |
64 | 65 | 66 | setText(e.target.value)} 69 | /> 70 | 71 | 72 | Find Jobs 75 | 76 | 77 | { 78 | posts.filter(post => post.profile.toLowerCase().includes(text.toLowerCase())).map(post => ( 79 | 80 | 81 | {post.profile} 82 | {post.type === "Offline" ? "Remote" : "Office"} 83 | Salary: {post.salary} 84 | 87 | {post.description.length > 150 ? post.description.substring(0, 150) + "..." : post.description} 88 | 89 | Experience: {post.experience} 90 | Technology: {post.technology} 91 | 92 | posted on {new Date(post.createdAt).toLocaleDateString()} 93 | 94 | 95 | 96 | )) 97 | } 98 | 99 | 100 | ) 101 | } 102 | 103 | export default AllPosts; -------------------------------------------------------------------------------- /quiz-application/client/src/pages/Login.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useContext } from "react"; 2 | import Input from "../components/input/Input"; 3 | import { DataContext } from "../context/DataProvider"; 4 | import { MESSAGES, loginDefault } from "../constants/constant"; 5 | import Button from "../components/button/Button"; 6 | import { useNavigate } from "react-router-dom"; 7 | import { routePath } from "../constants/route"; 8 | import { loginValidation } from "../utils/common-utils"; 9 | import { fetchUserData, saveUserData } from "../services/api"; 10 | 11 | const Login = ({ isUserAuthenticated }) => { 12 | const [error, setError] = useState(loginDefault); 13 | const [disabledInput, setDisabledInput] = useState(false); 14 | const [disabledBtn, setDisabledBtn] = useState(false); 15 | 16 | const { loginDetails, setLoginDetails } = useContext(DataContext); 17 | 18 | const navigate = useNavigate(); 19 | 20 | const onValueChange = (e) => { 21 | setError(loginDefault); 22 | 23 | if (e.target.name === 'phone') { 24 | setDisabledInput(false); 25 | } 26 | 27 | setLoginDetails({ ...loginDetails, [e.target.name]: e.target.value }); 28 | } 29 | 30 | const fetchUser = async (e) => { 31 | const response = await fetchUserData(loginDetails); 32 | 33 | if (response?.code === 2000) { 34 | setError(loginDefault); 35 | 36 | setLoginDetails({ 37 | ...loginDetails, 38 | name: response.data.name, 39 | email: response.data.email 40 | }) 41 | 42 | setDisabledInput(true); 43 | } else { 44 | setDisabledInput(false); 45 | } 46 | } 47 | 48 | const onSubmit = async (e) => { 49 | e.preventDefault(); 50 | 51 | setError(loginDefault); 52 | 53 | if (!loginValidation(loginDetails, error, setError)) { 54 | return; 55 | } 56 | 57 | setDisabledBtn(true); 58 | 59 | const payload = { 60 | phone: loginDetails.phone.trim(), 61 | name: loginDetails.name.trim(), 62 | email: loginDetails.email.trim() 63 | } 64 | 65 | const response = await saveUserData(payload); 66 | 67 | if (response.status === "SUCCESS") { 68 | isUserAuthenticated(true); 69 | navigate(routePath.quiz); 70 | } else { 71 | setError({ ...error, screen: MESSAGES.invalidApi }) 72 | } 73 | setDisabledBtn(false); 74 | } 75 | 76 | return ( 77 |
78 | onValueChange(e)} 85 | onBlur={fetchUser} 86 | maxLength={10} 87 | /> 88 | onValueChange(e)} 95 | disabled={disabledInput} 96 | /> 97 | onValueChange(e)} 104 | disabled={disabledInput} 105 | /> 106 |
124 | 125 | 126 | 127 | ) 128 | } 129 | 130 | export default CreatePost; --------------------------------------------------------------------------------