├── kandy ├── src │ ├── App.css │ ├── index.css │ ├── setupTests.js │ ├── App.test.js │ ├── reportWebVitals.js │ ├── index.js │ ├── App.js │ ├── components │ │ ├── About │ │ │ ├── about.jsx │ │ │ └── about.css │ │ ├── navigationbar │ │ │ ├── nav.jsx │ │ │ ├── footer │ │ │ │ ├── footer.css │ │ │ │ └── footer.jsx │ │ │ └── nav.css │ │ ├── contact │ │ │ ├── contact.jsx │ │ │ └── contact.css │ │ ├── services │ │ │ ├── services.css │ │ │ └── services.jsx │ │ ├── Authentication │ │ │ └── signup │ │ │ │ ├── signup.jsx │ │ │ │ └── signup.css │ │ └── home │ │ │ ├── home.jsx │ │ │ └── home.css │ └── logo.svg ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── .gitignore ├── github │ └── workflows │ │ └── deploy.yml ├── README.md └── package.json ├── .github └── workflows │ ├── deploy.yml │ └── README.md ├── ballerina-backend ├── modules │ ├── utils │ │ └── helper.bal │ ├── db │ │ └── db_connection.bal │ └── mongo │ │ ├── Module.md │ │ ├── mongo.bal │ │ └── tests │ │ └── mongo_test.bal ├── Ballerina.toml ├── .devcontainer.json ├── .gitignore ├── main.bal ├── README.md └── Dependencies.toml ├── main └── README.md /kandy/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kandy/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ballerina-backend/modules/utils/helper.bal: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ballerina-backend/modules/db/db_connection.bal: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kandy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /kandy/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heshan-Lahiru/kandy-website/HEAD/kandy/public/favicon.ico -------------------------------------------------------------------------------- /kandy/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heshan-Lahiru/kandy-website/HEAD/kandy/public/logo192.png -------------------------------------------------------------------------------- /kandy/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heshan-Lahiru/kandy-website/HEAD/kandy/public/logo512.png -------------------------------------------------------------------------------- /ballerina-backend/Ballerina.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | org = "iuhs" 3 | name = "ballerina_backend" 4 | version = "0.1.0" 5 | distribution = "2201.10.0" 6 | 7 | [build-options] 8 | observabilityIncluded = true 9 | -------------------------------------------------------------------------------- /ballerina-backend/.devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "ballerina/ballerina-devcontainer:2201.10.0", 3 | "customizations": { 4 | "vscode": { 5 | "extensions": ["WSO2.ballerina"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /kandy/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 | -------------------------------------------------------------------------------- /kandy/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 | -------------------------------------------------------------------------------- /ballerina-backend/modules/mongo/Module.md: -------------------------------------------------------------------------------- 1 | Prints "Hello, World!" with a main function. 2 | [//]: # (above is the module summary) 3 | 4 | # Module Overview 5 | Provides an overview about the module when generating the API documentations. 6 | For example, refer to https://lib.ballerina.io/ballerina/io/latest 7 | -------------------------------------------------------------------------------- /ballerina-backend/modules/mongo/mongo.bal: -------------------------------------------------------------------------------- 1 | # Returns the string `Hello` with the input string name. 2 | # 3 | # + name - name as a string or nil 4 | # + return - "Hello, " with the input string name 5 | public function hello(string? name) returns string { 6 | if name !is () { 7 | return string `Hello, ${name}`; 8 | } 9 | return "Hello, World!"; 10 | } 11 | -------------------------------------------------------------------------------- /kandy/.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 | -------------------------------------------------------------------------------- /kandy/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 | -------------------------------------------------------------------------------- /ballerina-backend/.gitignore: -------------------------------------------------------------------------------- 1 | # Ballerina generates this directory during the compilation of a package. 2 | # It contains compiler-generated artifacts and the final executable if this is an application package. 3 | target/ 4 | 5 | # Ballerina maintains the compiler-generated source code here. 6 | # Remove this if you want to commit generated sources. 7 | generated/ 8 | 9 | # Contains configuration values used during development time. 10 | # See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details. 11 | Config.toml 12 | -------------------------------------------------------------------------------- /kandy/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 | -------------------------------------------------------------------------------- /kandy/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 | -------------------------------------------------------------------------------- /kandy/github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: CI/CD Pipeline 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Set up Node.js 17 | uses: actions/setup-node@v2 18 | with: 19 | node-version: '18' 20 | 21 | - name: Install dependencies 22 | run: npm install 23 | 24 | - name: Build 25 | run: npm run build 26 | 27 | - name: Deploy to GitHub Pages 28 | run: | 29 | npm install gh-pages 30 | npm run build 31 | npx gh-pages -d build 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | -------------------------------------------------------------------------------- /ballerina-backend/modules/mongo/tests/mongo_test.bal: -------------------------------------------------------------------------------- 1 | import ballerina/io; 2 | import ballerina/test; 3 | 4 | // Before Suite Function 5 | 6 | @test:BeforeSuite 7 | function beforeSuiteFunc() { 8 | io:println("I'm the before suite function!"); 9 | } 10 | 11 | // Test function 12 | 13 | @test:Config {} 14 | function testFunction() { 15 | string name = "John"; 16 | string welcomeMsg = hello(name); 17 | test:assertEquals(welcomeMsg, "Hello, John"); 18 | } 19 | 20 | // Negative Test function 21 | 22 | @test:Config {} 23 | function negativeTestFunction() { 24 | string welcomeMsg = hello(()); 25 | test:assertEquals(welcomeMsg, "Hello, World!"); 26 | } 27 | 28 | // After Suite Function 29 | 30 | @test:AfterSuite 31 | function afterSuiteFunc() { 32 | io:println("I'm the after suite function!"); 33 | } 34 | -------------------------------------------------------------------------------- /kandy/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; 3 | import Home from './components/home/home'; 4 | import SignUpForm from './components/Authentication/signup/signup'; 5 | import About from './components/About/about'; 6 | import Services from './components/services/services'; 7 | import Contact from './components/contact/contact'; 8 | 9 | function App() { 10 | return ( 11 | 12 | 13 | } /> 14 | } /> 15 | } /> 16 | } /> 17 | } /> 18 | 19 | 20 | ); 21 | } 22 | 23 | export default App; 24 | -------------------------------------------------------------------------------- /.github/workflows/README.md: -------------------------------------------------------------------------------- 1 | # Setting Up a CI/CD Pipeline for Your React Website 2 | 3 | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen) 4 | ![License](https://img.shields.io/badge/license-MIT-blue) 5 | ![Version](https://img.shields.io/badge/version-0.1.0-orange) 6 | ![Dependencies](https://img.shields.io/badge/dependencies-checked-successful-brightgreen) 7 | 8 | Setting up a CI/CD pipeline for your React website involves several steps. Here's a simple step-by-step guide to get you started: 9 | 10 | ## Step 1: Choose Your CI/CD Tool 11 | 12 | There are several CI/CD tools available. Popular options include: 13 | 14 | - **GitHub Actions** 15 | - **Travis CI** 16 | - **CircleCI** 17 | - **GitLab CI** 18 | 19 | For this example, we'll use **GitHub Actions** since it's integrated with GitHub. 20 | 21 | ## Step 2: Create Your React App 22 | 23 | If you haven't already created your React app, do it using: 24 | 25 | ```bash 26 | npx create-react-app my-app 27 | cd my-app 28 | -------------------------------------------------------------------------------- /kandy/README.md: -------------------------------------------------------------------------------- 1 | To install React project: 2 | npx create-react-app my-app 3 | cd my-app 4 | npm install react-router-dom react-bootstrap bootstrap@5.1.3 date-fns 5 | 6 | For React Router DOM: 7 | import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; 8 | 9 | For React Bootstrap: 10 | import 'bootstrap/dist/css/bootstrap.min.css'; 11 | import { Button, Navbar } from 'react-bootstrap'; 12 | 13 | For Date Handling with: 14 | import { format, parseISO } from 'date-fns'; 15 | 16 | A promise-based HTTP client for making API requests 17 | npm install axios 18 | 19 | A CSS preprocessor that adds functionality like variables, nesting, and mixins. 20 | npm install sass 21 | 22 | Redux Toolkit & React Redux: 23 | npm install @reduxjs/toolkit react-redux 24 | 25 | PropTypes: 26 | npm install prop-types 27 | 28 | ///////////////////////////////////////////////////////// 29 | Install all packages: 30 | npm install react-router-dom react-bootstrap bootstrap@5.1.3 date-fns axios sass @reduxjs/toolkit react-redux prop-types 31 | /////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /kandy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kandy", 3 | "version": "0.1.0", 4 | "private": true, 5 | "homepage": "https://github.com/Heshan-Lahiru/kandy-website", 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^5.17.0", 8 | "@testing-library/react": "^13.4.0", 9 | "@testing-library/user-event": "^13.5.0", 10 | "lucide-react": "^0.439.0", 11 | "react": "^18.3.1", 12 | "react-dom": "^18.3.1", 13 | "react-router-dom": "^6.26.1", 14 | "react-scripts": "5.0.1", 15 | "web-vitals": "^2.1.4" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test", 21 | "eject": "react-scripts eject" 22 | }, 23 | "eslintConfig": { 24 | "extends": [ 25 | "react-app", 26 | "react-app/jest" 27 | ] 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /kandy/src/components/About/about.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './about.css' 3 | import Nav from '../navigationbar/nav'; 4 | import Footer from '../navigationbar/footer/footer'; 5 | const AboutUs = () => { 6 | 7 | 8 | return ( 9 | <> 10 |