diff --git a/apps/package-lock.json b/apps/package-lock.json index 52b7228..9a5b0c1 100644 --- a/apps/package-lock.json +++ b/apps/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "vite_react_shadcn_ts", "version": "0.0.0", + "hasInstallScript": true, "dependencies": { "@hookform/resolvers": "^3.9.0", "@radix-ui/react-accordion": "^1.2.0", @@ -36,7 +37,8 @@ "@radix-ui/react-toggle": "^1.1.0", "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", - "caniuse-lite": "^1.0.30001722", + "browserslist": "^4.25.1", + "caniuse-lite": "^1.0.30001733", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -127,13 +129,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.9.tgz", - "integrity": "sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.2.tgz", + "integrity": "sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } @@ -3335,10 +3334,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", - "dev": true, + "version": "4.25.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", + "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", "funding": [ { "type": "opencollective", @@ -3355,10 +3353,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.1" + "caniuse-lite": "^1.0.30001726", + "electron-to-chromium": "^1.5.173", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -3387,9 +3385,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001722", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", - "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", + "version": "1.0.30001733", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001733.tgz", + "integrity": "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q==", "funding": [ { "type": "opencollective", @@ -4128,10 +4126,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.45", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.45.tgz", - "integrity": "sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==", - "dev": true, + "version": "1.5.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.199.tgz", + "integrity": "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ==", "license": "ISC" }, "node_modules/embla-carousel": { @@ -4211,7 +4208,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -4617,9 +4613,9 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -5582,10 +5578,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true, + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "license": "MIT" }, "node_modules/normalize-path": { @@ -6234,12 +6229,6 @@ "decimal.js-light": "^2.4.1" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -6758,10 +6747,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "funding": [ { "type": "opencollective", @@ -6779,7 +6767,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" diff --git a/apps/src/App.tsx b/apps/src/App.tsx index a32fa1e..203724a 100644 --- a/apps/src/App.tsx +++ b/apps/src/App.tsx @@ -4,6 +4,7 @@ import HomePage from "./pages/Home"; import CoffeeApp from "./pages/CoffeeApp"; import BusApp from "./pages/BusApp"; import StarRealmsApp from "./pages/StarRealmsApp"; +import JournalApp from "./pages/JournalApp"; const App = () => ( @@ -13,6 +14,7 @@ const App = () => ( } /> } /> } /> + } /> diff --git a/apps/src/pages/Home.tsx b/apps/src/pages/Home.tsx index dd55f51..c66d2b3 100644 --- a/apps/src/pages/Home.tsx +++ b/apps/src/pages/Home.tsx @@ -1,10 +1,19 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Link } from "react-router-dom"; -import { Coffee, Home, Bus, Users } from "lucide-react"; +import { Coffee, Home, Bus, Users, BookOpen } from "lucide-react"; const HomePage = () => { const apps = [ + { + id: "journal", + title: "6-Minute Journal", + description: "A guided reflection to add space and freedom around your beliefs", + icon: , + path: "/journal", + bgColor: "from-green-100 to-teal-100", + borderColor: "border-green-200" + }, { id: "coffee", title: "Coffee Tournament", diff --git a/apps/src/pages/JournalApp.tsx b/apps/src/pages/JournalApp.tsx new file mode 100644 index 0000000..ea7ef75 --- /dev/null +++ b/apps/src/pages/JournalApp.tsx @@ -0,0 +1,156 @@ +import React, { useState, useEffect } from 'react'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Textarea } from '@/components/ui/textarea'; +import { Button } from '@/components/ui/button'; +import { Progress } from '@/components/ui/progress'; + +const journalSteps = [ + { + step: 1, + title: 'Name the belief.', + prompt: 'Pick something you feel strongly about. Just name it. Don’t justify it yet.', + example: 'Example: “People should always keep their promises.”', + }, + { + step: 2, + title: 'Notice the feeling attached to it.', + prompt: 'When this belief is challenged, do I get angry? Hurt? Protective? Proud? Name the emotion in plain language.', + example: 'This helps you see this isn’t just an idea — it’s tied to your identity.', + }, + { + step: 3, + title: 'Where did I learn this?', + prompt: 'Not to accuse, but to trace lineage. A parent? A cultural value? A teacher? A role model? A past wound?', + example: 'This is about history, not blame.', + }, + { + step: 4, + title: 'What does this belief do for me?', + prompt: 'Does it: Make me feel safe? Give me direction? Help me avoid vulnerability? Help me connect with people? Protect me from being hurt again?', + example: 'This reveals what it’s holding up.', + }, + { + step: 5, + title: 'When is this belief true?', + prompt: "Don't ask if it's always true. Ask where it works well.", + example: 'Examples: Keeping promises builds trust. Being assertive protects boundaries. Independence prevents dependency.', + }, + { + step: 6, + title: 'When does this belief harm me?', + prompt: 'No self-attack. No shame. Just look gently.', + example: 'Examples: “Always keeping promises” → I never allow myself to change. “Be strong, don’t need anyone” → I end up isolated.', + }, +]; + +const JournalApp = () => { + const [currentStep, setCurrentStep] = useState(0); + const [answers, setAnswers] = useState(Array(6).fill('')); + const [timeLeft, setTimeLeft] = useState(60); + const [isStarted, setIsStarted] = useState(false); + + useEffect(() => { + if (!isStarted || currentStep >= journalSteps.length) { + return; + } + + if (timeLeft === 0) { + setCurrentStep((prevStep) => prevStep + 1); + setTimeLeft(60); + } + + const timer = setInterval(() => { + setTimeLeft((prevTime) => prevTime - 1); + }, 1000); + + return () => clearInterval(timer); + }, [timeLeft, isStarted, currentStep]); + + const handleAnswerChange = (e: React.ChangeEvent) => { + const newAnswers = [...answers]; + newAnswers[currentStep] = e.target.value; + setAnswers(newAnswers); + }; + + const handleStart = () => { + setIsStarted(true); + setCurrentStep(0); + setTimeLeft(60); + }; + + const handleRestart = () => { + setIsStarted(false); + setCurrentStep(0); + setAnswers(Array(6).fill('')); + setTimeLeft(60); + }; + + if (!isStarted) { + return ( +
+ + + 6-Minute Belief Reflection + + +

Ready to explore your beliefs? You'll have 1 minute for each of the 6 steps.

+ +
+
+
+ ); + } + + if (currentStep >= journalSteps.length) { + return ( +
+ + + Your Belief Reflection + + + {journalSteps.map((step, index) => ( +
+

{step.title}

+

{answers[index] || 'No answer'}

+
+ ))} +
+ +
+
+
+
+ ); + } + + const step = journalSteps[currentStep]; + + return ( +
+ + + Step {step.step}: {step.title} + + +
+

{step.prompt}

+

{step.example}

+
+
+ +

{timeLeft} seconds remaining

+
+