4
backend/package-lock.json
generated
4
backend/package-lock.json
generated
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "resias-backend",
|
"name": "congruity-backend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "resias-backend",
|
"name": "congruity-backend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.74.0",
|
"@anthropic-ai/sdk": "^0.74.0",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "resias-backend",
|
"name": "congruity-backend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Resias AI clustering feature - backend for ProjectPilot",
|
"description": "congruity AI clustering feature - backend for ProjectPilot",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Resias</title>
|
<title>kohngrüti app</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
4
frontend/package-lock.json
generated
4
frontend/package-lock.json
generated
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "resias-frontend",
|
"name": "congruity-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "resias-frontend",
|
"name": "congruity-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tanstack/react-query": "^5.90.21",
|
"@tanstack/react-query": "^5.90.21",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "resias-frontend",
|
"name": "congruity-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Routes, Route, Navigate } from 'react-router-dom';
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
||||||
import Home from './pages/Home';
|
import Home from './pages/Home';
|
||||||
import './App.css'
|
import './styles/App.css'
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
type ClusterButtonProps = {
|
import '../styles/button.css';
|
||||||
|
|
||||||
|
type ButtonProps = {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
|
label: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ClusterButton = ({ onClick, isLoading }: ClusterButtonProps) => {
|
const Button = ({ onClick, isLoading, label }: ButtonProps) => {
|
||||||
return (
|
return (
|
||||||
<button onClick={onClick} disabled={isLoading}>
|
<button className="primaryButton" onClick={onClick} disabled={isLoading}>
|
||||||
{isLoading ? 'Clustering...' : 'Run Clustering'}
|
{isLoading ? 'Working...' : label}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ClusterButton;
|
export default Button;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useGetStickies, useClusterStickies } from '../api/api';
|
import { useGetStickies, useClusterStickies } from '../api/api';
|
||||||
import type { Sticky as StickyType } from '../types/types';
|
import type { Sticky as StickyType } from '../types/types';
|
||||||
import Sticky from './sticky';
|
import Sticky from './sticky';
|
||||||
import ClusterButton from './button';
|
import Button from './button';
|
||||||
import './stickies.css';
|
import '../styles/stickies.css';
|
||||||
|
|
||||||
const Stickies = () => {
|
const Stickies = () => {
|
||||||
const { data: stickies, isLoading, error } = useGetStickies();
|
const { data: stickies, isLoading, error } = useGetStickies();
|
||||||
@@ -26,7 +26,9 @@ const Stickies = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ClusterButton onClick={handleCluster} isLoading={isPending} />
|
<div>
|
||||||
|
<Button onClick={handleCluster} isLoading={isPending} label="Group Notes By Theme"/>
|
||||||
|
</div>
|
||||||
<div className="clusters-container">
|
<div className="clusters-container">
|
||||||
{clusters.map((group) => (
|
{clusters.map((group) => (
|
||||||
<div key={group.label} className="cluster-group">
|
<div key={group.label} className="cluster-group">
|
||||||
@@ -46,7 +48,9 @@ const Stickies = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ClusterButton onClick={handleCluster} isLoading={isPending} />
|
<div>
|
||||||
|
<Button onClick={handleCluster} isLoading={isPending} label="Group Notes By Theme" />
|
||||||
|
</div>
|
||||||
<div className="stickies-grid">
|
<div className="stickies-grid">
|
||||||
{stickies?.map((sticky) => (
|
{stickies?.map((sticky) => (
|
||||||
<Sticky key={sticky.id} sticky={sticky} />
|
<Sticky key={sticky.id} sticky={sticky} />
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { Sticky as StickyType } from '../types/types';
|
import type { Sticky as StickyType } from '../types/types';
|
||||||
|
import '../styles/sticky.css';
|
||||||
|
|
||||||
const COLOR_MAP: Record<string, string> = {
|
const COLOR_MAP: Record<string, string> = {
|
||||||
yellow: '#fdfd96',
|
yellow: '#fdfd96',
|
||||||
@@ -18,20 +19,9 @@ const Sticky = ({ sticky }: StickyProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className="sticky-note"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
width: '180px',
|
|
||||||
minHeight: '180px',
|
|
||||||
padding: '16px',
|
|
||||||
borderRadius: '2px',
|
|
||||||
boxShadow: '2px 4px 8px rgba(0, 0, 0, 0.15)',
|
|
||||||
fontFamily: "'Patrick Hand', cursive, system-ui",
|
|
||||||
fontSize: '14px',
|
|
||||||
lineHeight: '1.4',
|
|
||||||
color: '#333',
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'flex-start',
|
|
||||||
wordBreak: 'break-word',
|
|
||||||
transform: `rotate(${Math.random() * 4 - 2}deg)`,
|
transform: `rotate(${Math.random() * 4 - 2}deg)`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { StrictMode } from 'react'
|
|||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import './index.css'
|
import './styles/index.css'
|
||||||
import App from './App.tsx'
|
import App from './App.tsx'
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Stickies from '../components/stickies';
|
|||||||
const Home = () => {
|
const Home = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Resias - </h1>
|
<h1 className="mainHead">kohngrüti</h1>
|
||||||
<Stickies />
|
<Stickies />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
7
frontend/src/styles/button.css
Normal file
7
frontend/src/styles/button.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.primaryButton {
|
||||||
|
font-family: "Sulphur Point", sans-serif;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
width: 16rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
margin-top: 14px;
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light&display=swap');
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Sulphur+Point:wght@300;400;700&display=swap');
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@@ -22,6 +25,11 @@ h1 {
|
|||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-family: "Sulphur Point", sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
@@ -48,6 +56,16 @@ button:disabled {
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mainHead {
|
||||||
|
font-size: 4rem;
|
||||||
|
color: #fff;
|
||||||
|
margin: 2px 0px 24px 0px;
|
||||||
|
font-family: "Sulphur Point", sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: light) {
|
||||||
:root {
|
:root {
|
||||||
color: #213547;
|
color: #213547;
|
||||||
14
frontend/src/styles/sticky.css
Normal file
14
frontend/src/styles/sticky.css
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
.sticky-note {
|
||||||
|
width: 180px;
|
||||||
|
min-height: 180px;
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
font-family: 'Shadows Into Light', cursive;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user