Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AmakrushAI/app
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Amruth-Vamshi/app
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

There isn’t anything to compare.

AmakrushAI:main and Amruth-Vamshi:master are entirely different commit histories.

Showing with 29,316 additions and 0 deletions.
  1. +16 −0 .env.local
  2. +3 −0 .gitignore
  3. +1 −0 @types/alltypes.d.ts
  4. +77 −0 README.md
  5. +9 −0 jwt.pem
  6. +5 −0 next-env.d.ts
  7. +15 −0 next.config.js
  8. +73 −0 package.json
  9. BIN public/avatar.jpg
  10. BIN public/background.jpg
  11. BIN public/background2.jpg
  12. BIN public/chakshu.jpg
  13. BIN public/dark_back.jpg
  14. BIN public/dark_back.png
  15. BIN public/empty_otp.png
  16. BIN public/favicon.ico
  17. BIN public/light_back.jpg
  18. BIN public/light_back2.jpg
  19. BIN public/light_back_2.jpg
  20. +1,507 −0 public/line.svg
  21. BIN public/logo192.png
  22. BIN public/logo512.png
  23. +25 −0 public/manifest.json
  24. BIN public/neelesh.png
  25. BIN public/otp_done.png
  26. +3 −0 public/robots.txt
  27. BIN public/shruti.png
  28. BIN public/sidebar.png
  29. +1,444 −0 public/userAccount.svg
  30. +4 −0 public/vercel.svg
  31. BIN public/wrong_otp.png
  32. BIN src/assets/fonts/Mulish-Bold.ttf
  33. BIN src/assets/fonts/Mulish-Demi.ttf
  34. BIN src/assets/fonts/Mulish-Medium.ttf
  35. BIN src/assets/fonts/Mulish-Regular.ttf
  36. BIN src/assets/images/KrishiMela.png
  37. BIN src/assets/images/c4gt_logo.png
  38. BIN src/assets/images/emptyOtp.png
  39. BIN src/assets/images/homeScreen.png
  40. BIN src/assets/images/homeScreen2.png
  41. BIN src/assets/images/killua.jpg
  42. BIN src/assets/images/krushak_odisha.png
  43. BIN src/assets/images/login.png
  44. BIN src/assets/images/logo.jpg
  45. BIN src/assets/images/logo.png
  46. +10 −0 src/assets/images/logo.svg
  47. BIN src/assets/images/phone.png
  48. BIN src/assets/images/robot.png
  49. BIN src/assets/images/sidebar.png
  50. +628 −0 src/components/App.tsx
  51. +37 −0 src/components/ChatSection/ChatItem.module.css
  52. +71 −0 src/components/ChatSection/ChatItem.tsx
  53. +7 −0 src/components/ChatSection/ChatSection.module.css
  54. +74 −0 src/components/ChatSection/index.tsx
  55. +33 −0 src/components/ColorModeSwitcher/index.tsx
  56. +13 −0 src/components/ColorModeSwitcher/theme.ts
  57. +169 −0 src/components/LoginPage/LoginPage.tsx
  58. +51 −0 src/components/LoginPage/login.module.css
  59. +104 −0 src/components/MessageWindow/index.module.css
  60. +310 −0 src/components/MessageWindow/index.tsx
  61. +57 −0 src/components/Modal/index.tsx
  62. +57 −0 src/components/OTPpage/Notifications/index.tsx
  63. +65 −0 src/components/OTPpage/OTP.module.css
  64. +217 −0 src/components/OTPpage/index.tsx
  65. +135 −0 src/components/PhoneView/ChatWindow/index.module.css
  66. +151 −0 src/components/PhoneView/ChatWindow/index.tsx
  67. +84 −0 src/components/PhoneView/Modal/index.module.css
  68. +53 −0 src/components/PhoneView/Modal/index.tsx
  69. +113 −0 src/components/PhoneView/Profile/index.tsx
  70. +30 −0 src/components/PhoneView/Profile/profile.module.css
  71. +38 −0 src/components/PhoneView/RecentChats/Buttons/index.module.css
  72. +45 −0 src/components/PhoneView/RecentChats/Buttons/index.tsx
  73. +106 −0 src/components/PhoneView/RecentChats/ChatItem/index.module.css
  74. +92 −0 src/components/PhoneView/RecentChats/ChatItem/index.tsx
  75. +119 −0 src/components/PhoneView/RecentChats/index.module.css
  76. +189 −0 src/components/PhoneView/RecentChats/index.tsx
  77. +77 −0 src/components/PhoneView/index.tsx
  78. +114 −0 src/components/Profile/index.tsx
  79. +30 −0 src/components/Profile/profile.module.css
  80. +8 −0 src/components/Settings/RecentChats.module.css
  81. +30 −0 src/components/Settings/Setting.tsx
  82. +228 −0 src/components/Settings/index.tsx
  83. +22 −0 src/components/Settings/profileSection.tsx
  84. +11 −0 src/components/SideBar/Index.tsx
  85. +7 −0 src/components/SideBar/SideBar.module.css
  86. +80 −0 src/components/TextBar/index.module.css
  87. +212 −0 src/components/TextBar/index.tsx
  88. +106 −0 src/components/WebView/ChatWindow/MessageWindow/index.module.css
  89. +329 −0 src/components/WebView/ChatWindow/MessageWindow/index.tsx
  90. +83 −0 src/components/WebView/ChatWindow/TextBar/index.module.css
  91. +472 −0 src/components/WebView/ChatWindow/TextBar/index.tsx
  92. +141 −0 src/components/WebView/ChatWindow/index.module.css
  93. +147 −0 src/components/WebView/ChatWindow/index.tsx
  94. +100 −0 src/components/WebView/Modal/index.module.css
  95. +51 −0 src/components/WebView/Modal/index.tsx
  96. +113 −0 src/components/WebView/Profile/index.tsx
  97. +30 −0 src/components/WebView/Profile/profile.module.css
  98. +105 −0 src/components/WebView/RecentChat/ChatItem/index.module.css
  99. +91 −0 src/components/WebView/RecentChat/ChatItem/index.tsx
  100. +66 −0 src/components/WebView/RecentChat/index.module.css
  101. +116 −0 src/components/WebView/RecentChat/index.tsx
  102. +21 −0 src/components/WebView/SettingsBar/Buttons/index.module.css
  103. +29 −0 src/components/WebView/SettingsBar/Buttons/index.tsx
  104. +97 −0 src/components/WebView/SettingsBar/Light.tsx
  105. +88 −0 src/components/WebView/SettingsBar/index.module.css
  106. +133 −0 src/components/WebView/SettingsBar/index.tsx
  107. +66 −0 src/components/WebView/index.tsx
  108. +67 −0 src/components/websocket.ts
  109. +17 −0 src/pages/_app.tsx
  110. +30 −0 src/pages/_document.tsx
  111. +25 −0 src/pages/api/auth.js
  112. +204 −0 src/pages/index.tsx
  113. +17 −0 src/pages/login.tsx
  114. +17 −0 src/pages/otp.tsx
  115. +41 −0 src/stories/Button.stories.tsx
  116. +52 −0 src/stories/Button.tsx
  117. +25 −0 src/stories/Header.stories.tsx
  118. +71 −0 src/stories/Header.tsx
  119. +219 −0 src/stories/Introduction.stories.mdx
  120. +26 −0 src/stories/Page.stories.tsx
  121. +91 −0 src/stories/Page.tsx
  122. +1 −0 src/stories/assets/code-brackets.svg
  123. +1 −0 src/stories/assets/colors.svg
  124. +1 −0 src/stories/assets/comments.svg
  125. +1 −0 src/stories/assets/direction.svg
  126. +1 −0 src/stories/assets/flow.svg
  127. +1 −0 src/stories/assets/plugin.svg
  128. +1 −0 src/stories/assets/repo.svg
  129. +1 −0 src/stories/assets/stackalt.svg
  130. +30 −0 src/stories/button.css
  131. +32 −0 src/stories/header.css
  132. +69 −0 src/stories/page.css
  133. +76 −0 src/styles/globals.css
  134. +149 −0 src/utils/serviceWorker.ts
  135. +12 −0 src/utils/test-utils.tsx
  136. +37 −0 tsconfig.json
  137. +18,558 −0 yarn.lock
16 changes: 16 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NEXT_PUBLIC_MAGICBELL_API_KEY="$MAGICBELL_API_KEY"
NEXT_PUBLIC_MAGICBELL_USER_EMAIL="$MAGICBELL_USER_EMAIL"
c="wss://ts.gpt3.samagra.io"

NEXT_PUBLIC_OTP_BASE_URL="https://user-service.chakshu-rd.samagra.io/"

# FireBase credentials
NEXT_PUBLIC_FIREBASE_API_KEY="AIzaSyBAW9eosfF-oo5xPXXeoBp810YLyFlYZJw"
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="testing-uci-web-channel.firebaseapp.com"
NEXT_PUBLIC_FIREBASE_PROJECT_ID="testing-uci-web-channel"
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="testing-uci-web-channel.appspot.com"
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="584834206650"
NEXT_PUBLIC_FIREBASE_ID="1:584834206650:web:b1a8a5a03dd231406e2b83"
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID="G-WSYRRR972G"

NEXT_PUBLIC_FIREBASE_VAPID_KEY="BKuweez_2-hT2OYFRwUZ6CUuH3B3wrY0y1EOWlnbYtML0Iy7okQQZiiFZwzIYoin5TqdglT-18k-ki5cY_aUyjc"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.env
.next
1 change: 1 addition & 0 deletions @types/alltypes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'react-font-size-changer';
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Unified Communication Interface
[![ci](https://github.com/samagra-comms/uci-web-channel/actions/workflows/ci.yml/badge.svg)](https://github.com/samagra-comms/uci-web-channel/actions/workflows/ci.yml)
[![badges](https://github.com/samagra-comms/uci-web-channel/actions/workflows/badges.yml/badge.svg)](https://github.com/samagra-comms/uci-web-channel/actions/workflows/badges.yml)
![cypress version](https://img.shields.io/badge/cypress-9.7.0-brightgreen)

## About UCI :open_book:

The Unified Communications Interface (UCI) aims to democratize the use of different communication channels such as WhatsApp, Telegram, SMS, email and more for governance use cases through a standard configurable manner that is reusable and scalable across all governance use cases.

## Features :dart:

- Ability to connect to any communication channel through any service provider without doing custom changes in the core logic UCI.
- The UCI ecosystem is independent of external variables like communication channel and service provider powered by XMessage standard.
- Ability to have a configurable conversation logic for the bot
- Ability to connect to any database (local or federated) via services
- Ability to include value added services in the bot interaction flow through Microservices (Internal or External)
- Ability to create tools on top of UCI APIs to manage Bot configuration, conversations and visualization


## Requirements :scroll:

[NodeJS](https://nodejs.org/en/download/) and NPM or [yarn](https://yarnpkg.com/getting-started/install)

## Installation :walking:

### 1. Fork it :fork_and_knife:

You can get your own fork/copy of [UCI](https://github.com/Samagra-Development/uci-web-channel) by using the <kbd><b>Fork</b></kbd> button.

### 2. Clone it :busts_in_silhouette:

You need to clone (download) it to a local machine using

```sh
git clone https://github.com/Your_Username/uci-web-channel.git
```

> This makes a local copy of the repository in your machine.
Once you have cloned the `uci-web-channel` repository in GitHub, move to that folder first using the change directory command.

```sh
# This will change directory to a folder uci-web-channel
cd uci-web-channel
```

Move to this folder for all other commands.

### 3. Set it up :arrow_up:

Run the following commands to see that _your local copy_ has a reference to _your forked remote repository_ in GitHub :octocat:

```sh
git remote -v
origin https://github.com/Your_Username/uci-web-channel.git (fetch)
origin https://github.com/Your_Username/uci-web-channel.git (push)
```

### 4. Create a new .env file and copy contents from .env.sample :open_file_folder:

```sh
cp .env.sample .env
```

The websocket connection URL for the plaground can be used for testing - `wss://comms-playground.samagra.io` for the `REACT_APP_TRANSPORT_SOCKET_URL`.

### 5. Run it :checkered_flag:

Run `yarn start`

## Designs
Below are the designs of how output screens will look like. For more detailed view you can checkout the [Figma](https://www.figma.com/file/d8JiwkYJqGYXQaflCyNVzl/UCI-web-channel?node-id=0%3A1) file.
![Designs](https://user-images.githubusercontent.com/77741561/171156677-0ee016dd-a240-4edc-b2e8-50b08ac06a58.png)

## Contributing


We really like contributions in several forms, see [CONTRIBUTING.md](CONTRIBUTING.md)
9 changes: 9 additions & 0 deletions jwt.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmPw09w/sAcleZy+A4XJs
ncT2oYZv5I3f4vQ/Pucet1EKrgpxRsZF1KFQLM29+9d29BJvAMevpz8dHoyb/S4/
COurBFSnDkrKTa9Zl9y7K4Udq6dtjCOL+WHaDdeHVHXYI/c8U3eq5YStM/PWjWX5
r3TsQ2OniFrLNMJaNdGg72kj3YrvJYf5AaGyE9JrMrfTxxyLrnERULjvZkHCXthQ
jXld7bpL3gMOlzDDrScIQsEVSAOOSzaxu47tvoBC7JALyOe127YneKTCKuTLd4Mp
BhDJeg9x3UvKydoGmHTc1ckPEW7rJHU3DJ+Llwvgk5QE895fVBOSwTGRzz31YFdD
swIDAQAB
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
15 changes: 15 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
}

module.exports = {
nextConfig,
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
}
73 changes: 73 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"name": "next-uci-web-channel",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/icons": "^1.1.5",
"@chakra-ui/react": "^1.8.8",
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@magicbell/magicbell-react": "^8.5.3",
"@nextui-org/react": "^1.0.0-beta.12",
"@storybook/react": "^6.5.9",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^10.4.9",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^25.2.3",
"@types/node": "^12.20.46",
"@types/react": "^18.0.28",
"@types/react-dom": "^16.9.14",
"bootstrap": "^5.1.3",
"framer-motion": "^6.3.15",
"jsonwebtoken": "^8.5.1",
"next": "12.1.6",
"react": "18.2.0",
"react-alert": "^7.0.3",
"react-alert-template-basic": "^1.0.2",
"react-bootstrap": "^2.4.0",
"react-cookie": "^4.1.1",
"react-dom": "18.2.0",
"react-font-size-changer": "^0.2.0",
"react-icons": "^4.3.1",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.0",
"react-toastify": "^9.0.5",
"socket.io-client": "^4.5.1",
"typescript": "^4.9.3",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@cypress/react": "^5.12.5",
"@cypress/webpack-dev-server": "^1.8.4",
"@storybook/addon-actions": "^6.4.19",
"@storybook/addon-essentials": "^6.4.19",
"@storybook/addon-interactions": "^6.4.19",
"@storybook/addon-links": "^6.4.19",
"@storybook/builder-webpack5": "^6.4.19",
"@storybook/manager-webpack5": "^6.4.19",
"@storybook/node-logger": "^6.4.19",
"@storybook/preset-create-react-app": "^4.0.1",
"@storybook/react": "^6.4.19",
"@storybook/testing-library": "^0.0.9",
"@types/node": "18.0.0",
"@types/react": "^16.14.23",
"@types/react-alert": "^7.0.2",
"@types/react-dom": "18.0.5",
"cypress": "^9.7.0",
"eslint": "8.18.0",
"eslint-config-next": "12.1.6",
"prettier": "^2.5.1",
"typescript": "4.7.4",
"webpack": "^5.69.1",
"webpack-dev-server": "^4.9.0"
}
}
Binary file added public/avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/background2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/chakshu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dark_back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dark_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/empty_otp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/light_back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/light_back2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/light_back_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading