diff --git a/gcloud.json b/gcloud.json deleted file mode 100644 index 5c68549..0000000 --- a/gcloud.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "service_account", - "project_id": "crimata", - "private_key_id": "3a324fa3fcca4cea589e4b5007f4142db4b3a84d", - "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxFJOjhIkYlyhn\nHjtpFC5EOwzNFZem6k6SS7zcgWbNLe9mcBsiTKCjpxItzkIo0pnT32yqw+AKsqpv\n6+LVyzzjfB7vtEUflvg6KgmYMS4ixOTCEbN3e2qj1t2RnITXZR2VGSGdoKKyqZm0\ntWrmexQvSN20cByL1vfxD3E69oYFGhVraa0zmm94WXHAzofT6DkvGdrbK1s1G9jI\nG3mdQ1jN71tghyloeHL+R/1iKQoZFYTkVe6yWvccSNAZelt/5sciCKRTCArXj89X\nLwU6jGOKIsyqx3BeUyWaSS59xpnGX3meSf5Q9U+j45ePUiqO6TTleF+kWiBwjUpp\nfeYcwEIDAgMBAAECggEAElkN9R7p75zV6F1XDYu0QYiWyncmx/o2Gu1zC6vywWa1\ni/korpSe/mX0ub9J1p3/p1balRUHlUQu6brYvYs56140fGTC1sOXQ7uQU+8glySs\niTk5TbOBeKluOsSrdP/6oTTB6Wm4AegVz4YOpgPxsvaLVkNZidnDxfvyIQhjGYsO\nsvRaw48eEmGOa1uvDhgvPOxiDp5YEdxqSue/7ylzjBdKecDyLgTSDDf/p+FwIx5B\n2d/0uRgQBaAk6D/DNOvN8GrYyakFmlDjE72nrBGAJq50UyV6THOSDk+8cK+2QiS1\nEDCFufj+7Dk1EBfBFUFY8ZBB/pphpEWyLoFl7NzGCQKBgQDaj/KOOcj6BkkTj1WM\nRW3KhOE3nhsCQEgQGCflpycEAZj6J7ktBG2/4teDt9sr+Epx8ymnQCZa9pmysdrD\nU0aWku1qUx0IUKTtZbAEbB+AnrWYDYkIWU8kRUUvNHNTBg43VyuohV9wprPih138\nHWMeNac82/XICz2A3rv+Xkx8KwKBgQDPaaEEGWVs3nIhf/p3M3/xWNKt8fhAERpG\n0YpTjgHW3FQFYjiCTTIcuLO3qsDGmfIAB9tL37s2Y3e2wKBGUj/o69Fr7sWVPdsX\nJtUc0+KiG2Bs0hsyZPdk9UQiQX8y2eq1NZW7vEoxWso1bM64WURB5N8ocWePNJJx\nL2Oe75rtiQKBgQDLfQQOiRxmNF3rOSMkAywyRr9NQgXRdbniSiszNQotP7OHDF7q\n29m2suOGfjIv4O6m4wdf8WkEfd4hsleETc9Ft6wVtyYrrLGxWWCk7WnzHVDjLY7s\n2AHIOjostf+9R8EKoz1BnFN8laibev71EQNMiBWZow1VX6m2hymurWs2mwKBgQCb\nuY3n2v14qOb92e1+U89KsEq1yMd/qpeU9jwqEaO14wS+aglNY5ItWEuuqWhFdE3q\n0ftHUzpnUnUOZD+xrI1JXsyEgegc7i0xi7lUBI3S8kUKTxGWW5IXXcKDCbPrxQtg\ndFPweSUnOyg4xnHKnVMPOjyGS+bZ8TnF+zOLoBAtKQKBgF6hAOIwF1DheXT4p8xS\nlSGhl8dBxjsJDVwbnFWQceGzGnq1e3ncy/UItt42UCDVRWTH4r7pQ9eKyd/3foUD\n6KDIcCrYo2KJh6ZNFJ67XF30U+TuEg5U/9jTbWqDOwYVXcMcnzQE4ZiGBxVHL6xr\nNc8FRW5+7xh4zNfzhGUGt5kt\n-----END PRIVATE KEY-----\n", - "client_email": "crimata-service-account@crimata.iam.gserviceaccount.com", - "client_id": "102914612880037864172", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/crimata-service-account%40crimata.iam.gserviceaccount.com" -} diff --git a/login.svg b/login.svg new file mode 100644 index 0000000..a2ccbf3 --- /dev/null +++ b/login.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + Email + Password + + Login + + Submit + Create account + + \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index df36fcf..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/src/App.vue b/src/App.vue index 00294f1..13dae39 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,23 +5,22 @@ diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 Binary files a/src/assets/logo.png and /dev/null differ diff --git a/src/background.ts b/src/background.ts index 5b5ceec..0b11170 100644 --- a/src/background.ts +++ b/src/background.ts @@ -4,7 +4,6 @@ */ "use strict"; - import { protocol } from "electron"; import { initApp } from './background/initApp'; @@ -22,4 +21,4 @@ const isDevelopment = process.env.NODE_ENV !== "production"; console.log('Starting Crimata electron app.'); initApp(isDevelopment); -})(); +})(); \ No newline at end of file diff --git a/src/background/initApp.ts b/src/background/initApp.ts index 40de858..6fb9ac3 100644 --- a/src/background/initApp.ts +++ b/src/background/initApp.ts @@ -1,4 +1,3 @@ - "use strict"; import { app } from "electron"; diff --git a/src/components/messenger/index.vue b/src/components/home/index.vue similarity index 66% rename from src/components/messenger/index.vue rename to src/components/home/index.vue index c382f3a..a85b92c 100644 --- a/src/components/messenger/index.vue +++ b/src/components/home/index.vue @@ -12,8 +12,6 @@ diff --git a/src/components/messenger/messageBubble/bubbleDetails/computed.ts b/src/components/home/messageBubble/bubbleDetails/computed.ts similarity index 100% rename from src/components/messenger/messageBubble/bubbleDetails/computed.ts rename to src/components/home/messageBubble/bubbleDetails/computed.ts diff --git a/src/components/messenger/messageBubble/bubbleDetails/drawer.ts b/src/components/home/messageBubble/bubbleDetails/drawer.ts similarity index 100% rename from src/components/messenger/messageBubble/bubbleDetails/drawer.ts rename to src/components/home/messageBubble/bubbleDetails/drawer.ts diff --git a/src/components/messenger/messageBubble/index.vue b/src/components/home/messageBubble/index.vue similarity index 100% rename from src/components/messenger/messageBubble/index.vue rename to src/components/home/messageBubble/index.vue diff --git a/src/components/messenger/messageVisualizer/index.vue b/src/components/home/messageVisualizer/index.vue similarity index 100% rename from src/components/messenger/messageVisualizer/index.vue rename to src/components/home/messageVisualizer/index.vue diff --git a/src/components/messenger/messageVisualizer/viewDetails/anime.ts b/src/components/home/messageVisualizer/viewDetails/anime.ts similarity index 100% rename from src/components/messenger/messageVisualizer/viewDetails/anime.ts rename to src/components/home/messageVisualizer/viewDetails/anime.ts diff --git a/src/components/messenger/messageVisualizer/viewDetails/offsetCalculator.ts b/src/components/home/messageVisualizer/viewDetails/offsetCalculator.ts similarity index 100% rename from src/components/messenger/messageVisualizer/viewDetails/offsetCalculator.ts rename to src/components/home/messageVisualizer/viewDetails/offsetCalculator.ts diff --git a/src/components/messenger/messageVisualizer/viewDetails/visualizer.ts b/src/components/home/messageVisualizer/viewDetails/visualizer.ts similarity index 100% rename from src/components/messenger/messageVisualizer/viewDetails/visualizer.ts rename to src/components/home/messageVisualizer/viewDetails/visualizer.ts diff --git a/src/components/login/index.vue b/src/components/login/index.vue new file mode 100644 index 0000000..c75d625 --- /dev/null +++ b/src/components/login/index.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/src/components/messenger/mockMessages.ts b/src/components/messenger/mockMessages.ts deleted file mode 100644 index 8bda834..0000000 --- a/src/components/messenger/mockMessages.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { Message } from "@/types/message/index"; - -const Messages: Message[] = [ - { - content: "Welcome", - context: "ai", - subContext: "", - modifier: "ai", - id: "2", - time: "" - }, - { - content: - "add friend", - context: "launch", - subContext: "", - modifier: "sf", - id: "1", - time: "" - }, - { - content: "Did you mean to addcontact?", - context: "addcontact", - subContext: "", - modifier: "ai", - id: "5", - time: "" - }, - { - content: "yes", - context: "fulfill", - subContext: "", - modifier: "sf", - id: "6", - time: "" - }, - - { - content: "Hey Anna, did you get the paper done?", - context: "Mesage from Tommy McConville", - subContext: "New Conversation", - modifier: "ai", - id: "3", - time: "" - }, - { - content: "Hey do you know Enrique Hernandez?", - context: "Message from Crimata", - subContext: "", - modifier: "ai", - id: "7", - time: "" - }, - - { - content: "Yes posting it online soon.", - context: "You to Tommy McConville", - subContext: "", - modifier: "sf", - id: "4", - time: "" - }, - { - content: "Hey do you know Enrique Hernandez?", - context: "Message from Crimata", - subContext: "", - modifier: "ai", - id: "8", - time: "" - }, - { - content: "Hey Anna, did you get the paper done?", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "9", - time: "" - }, - { - content: "Hey Anna, did you get the paper done?", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "10", - time: "" - }, - { - content: "Yes posting it online soon.", - context: "Message from Tommy McConville", - subContext: "", - modifier: "sf", - id: "11", - time: "" - }, - { - content: - "I can be there at 5 pm tomorrow to greet you at a Chick file with my almond and chive salad.", - context: "You to Tommy McConville", - subContext: "", - modifier: "sf", - id: "12", - time: "" - }, - { - content: "Hey Anna, did you get the paper done?", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "13", - time: "" - }, - { - content: "Hey Anna, did you get the paper done?", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "14", - time: "" - }, - { - content: "Yes posting it online soon.", - context: "You to Tommy McConville", - subContext: "", - modifier: "sf", - id: "15", - time: "" - }, - { - content: "Sweet, thanks!", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "16", - time: "" - }, - { - content: "Hey do you know Enrique Hernandez?", - context: "Message from Crimata AI", - subContext: "", - modifier: "ai", - id: "17", - time: "" - }, - { - content: "Yes posting it online soon.", - context: "You to Tommy McConville", - subContext: "", - modifier: "sf", - id: "18", - time: "" - }, - { - content: "Sweet, thanks!", - context: "Message from Tommy McConville", - subContext: "", - modifier: "ai", - id: "19", - time: "" - }, -]; -export default Messages; diff --git a/src/components/splash/index.vue b/src/components/splash/index.vue new file mode 100644 index 0000000..3b0a133 --- /dev/null +++ b/src/components/splash/index.vue @@ -0,0 +1,73 @@ + + + + + + diff --git a/src/components/voiceBackground/index.vue b/src/components/voiceBackground/index.vue deleted file mode 100644 index 124a541..0000000 --- a/src/components/voiceBackground/index.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - diff --git a/src/main.ts b/src/main.ts index 531bb90..c03e8b6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,16 +1,18 @@ -import { createApp } from "vue"; +// src/main.ts + import App from "./App.vue"; import router from "./router"; -// animation library -import anime from "animejs"; - -// event handler library import mitt from "mitt"; +import anime from "animejs"; +import { createApp } from "vue"; + +// Handle events. const emitter = mitt(); -createApp(App) - .use(router) - .provide("animejs", anime) - .provide("mitt", emitter) - .mount("#app"); +const app = createApp(App) + +app.use(router) +app.provide("animejs", anime) +app.provide("mitt", emitter) +app.mount("#app"); diff --git a/src/preload.ts b/src/preload.ts index 87f3b68..b0cd4b9 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -7,10 +7,13 @@ declare global { ipcRenderer: typeof ipcRenderer; } } + window.ipcRenderer = ipcRenderer; process.once("loaded", () => { + window.addEventListener("message", event => { + // do something with custom event const message = event.data; @@ -25,6 +28,11 @@ process.once("loaded", () => { if (message.myTypeField === "update-recorder") { ipcRenderer.send("update-recorder", message.record); } - }); -}); + if (message.myTypeField === "submit-creds") { + ipcRenderer.send("submit-creds", message) + } + + }); + +}); \ No newline at end of file diff --git a/src/router.ts b/src/router.ts new file mode 100644 index 0000000..9e4c6d3 --- /dev/null +++ b/src/router.ts @@ -0,0 +1,40 @@ +import { + createRouter, + createWebHistory, + createWebHashHistory, + RouteRecordRaw +} from "vue-router"; + +import Home from "./views/home.vue"; +import Login from "./views/login.vue"; +import Splash from "./views/splash.vue"; + +// Define the routes (/*) for the app here. +const routes: Array = [ + + { + path: "/sdf", + name: "Splash", + component: Splash + }, + + { + path: "/sdf", + name: "Home", + component: Home + }, + + { + path: "/", + name: "Login", + component: Login + }, + +]; + +const router = createRouter({ + history: process.env.IS_ELECTRON ? createWebHashHistory() : createWebHistory(process.env.BASE_URL), + routes +}); + +export default router; \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts deleted file mode 100644 index cbb87ab..0000000 --- a/src/router/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createRouter, createWebHistory, createWebHashHistory, RouteRecordRaw } from "vue-router"; -import HomeIndex from "../views/home/index.vue"; - -const routes: Array = [ - { - path: "/", - name: "Home", - component: HomeIndex - }, -]; - -const router = createRouter({ - history: process.env.IS_ELECTRON ? createWebHashHistory() : createWebHistory(process.env.BASE_URL), - routes -}); - -export default router; diff --git a/src/views/home.vue b/src/views/home.vue new file mode 100644 index 0000000..0efa2ba --- /dev/null +++ b/src/views/home.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue deleted file mode 100644 index a0a4eda..0000000 --- a/src/views/home/index.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/src/views/login.vue b/src/views/login.vue new file mode 100644 index 0000000..5d6954e --- /dev/null +++ b/src/views/login.vue @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/src/views/user/register.vue b/src/views/register.vue similarity index 100% rename from src/views/user/register.vue rename to src/views/register.vue diff --git a/src/views/splash.vue b/src/views/splash.vue new file mode 100644 index 0000000..dbe7d0f --- /dev/null +++ b/src/views/splash.vue @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/src/views/user/login.vue b/src/views/user/login.vue deleted file mode 100644 index e69de29..0000000 diff --git a/testAudio.js b/testAudio.js index de50527..a83ef63 100644 --- a/testAudio.js +++ b/testAudio.js @@ -2,15 +2,13 @@ const fs = require('fs'); const speech = require('@google-cloud/speech'); const portAudio = require('naudiodon'); +// const rs = fs.createReadStream('rawAudio.wav'); +const WebSocket = require("ws") const {Writable} = require('stream'); // Creates a client const client = new speech.SpeechClient(); -// connect to test server -// const ws = new WebSocket("ws://localhost:8080"); -// Creates a client const client = new speech.SpeechClient(); - const encoding = 'LINEAR16'; const sampleRateHertz = 16000; const languageCode = 'en-US'; @@ -46,11 +44,9 @@ async function transcribeSpeech (audio) { console.log(`Transcription: ${transcription}`); } -const audioChunks = []; - let audioInput = []; // Create an instance of AudioIO with inOptions (defaults are as below), which will return a ReadableStream -let ia = new portAudio.AudioIO({ +const ia = new portAudio.AudioIO({ inOptions: { channelCount: 1, sampleFormat: 16, diff --git a/tsconfig.json b/tsconfig.json index 8e01147..307539b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,6 +32,7 @@ ] }, "include": [ + "src/*.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue",