|
1 |
| -# ADHD Time Analyzer |
| 1 | +# ADHD Time Analyzer 🕒 |
2 | 2 |
|
3 |
| -A more descriptive name would be: **"Anti-drift away ADHD Pomodoro time tracker."** |
4 |
| -I looked for a similar free app, tried various Notion and Obsidian extensions, but found nothing. So, here it is. |
| 3 | +Welcome to the **ADHD Time Analyzer**! This project aims to help individuals with ADHD manage their time effectively using the Pomodoro technique. Our tool provides a clean interface to track your focus periods, breaks, and overall productivity. |
5 | 4 |
|
6 |
| -> ⚠️ This is a **work-in-progress** version. |
| 5 | +[](https://github.com/Froozied/adhd-time-analyzer/releases) |
7 | 6 |
|
8 |
| -The main purpose of this project is to practice using **Nuxt Layers**. Eventually, I’d like to experiment with **two independent UI frontends**, and possibly also try out **different cloud backends**. The first version is based on **Firebase**, using **Auth**, **Firestore**, and **Nuxt UI**. |
| 7 | +## Table of Contents |
9 | 8 |
|
10 |
| -Alternatively, there's a demo version **without Firebase** — in that case, logs are stored in the browser’s **local storage**. You can download your logs in json file using the button in the UI. Logs are optimized, so I estimate that **5MB of local storage** should be enough to store a few months of data. |
| 9 | +- [Features](#features) |
| 10 | +- [Technologies Used](#technologies-used) |
| 11 | +- [Installation](#installation) |
| 12 | +- [Usage](#usage) |
| 13 | +- [Contributing](#contributing) |
| 14 | +- [License](#license) |
| 15 | +- [Contact](#contact) |
11 | 16 |
|
12 |
| -## DEMO: [demo-adhd.pagetailoring.com](https://demo-adhd.pagetailoring.com/) |
| 17 | +## Features 🌟 |
13 | 18 |
|
14 |
| -## App Purpose |
| 19 | +- **Pomodoro Timer**: Utilize the Pomodoro technique to enhance focus and productivity. |
| 20 | +- **Live Demo**: Test the application in real-time. |
| 21 | +- **User Authentication**: Sign in securely with Firebase Auth. |
| 22 | +- **Data Storage**: Choose between Firestore and localStorage for saving your data. |
| 23 | +- **Statistics Tracking**: Monitor your productivity trends over time. |
| 24 | +- **Responsive Design**: Works seamlessly on both desktop and mobile devices. |
15 | 25 |
|
16 |
| -This app will probably only make sense to someone with ADHD — someone who knows what it’s like to sit at a computer, completely forget about the world, food, or water, and stay there for hours. |
| 26 | +## Technologies Used 🛠️ |
17 | 27 |
|
18 |
| -A well-known method that helps with this is the [Pomodoro Technique](https://en.wikipedia.org/wiki/Pomodoro_Technique). Unfortunately, when you have ADHD, you often either forget to start the timer or keep restarting it like hitting the snooze button on an alarm clock. You lose track of how long you've actually been working — or not working. |
| 28 | +This project utilizes a range of modern technologies: |
19 | 29 |
|
20 |
| -_I built this app for myself to help with exactly that._ |
| 30 | +- **Nuxt.js**: A powerful framework for Vue.js applications. |
| 31 | +- **Pinia**: State management for Vue.js, providing a simple API for managing application state. |
| 32 | +- **Nuxt UI**: UI components for building beautiful applications. |
| 33 | +- **Firebase**: For authentication and database management. |
| 34 | +- **Firestore**: A NoSQL database for real-time data syncing. |
| 35 | +- **localStorage**: For offline data storage. |
21 | 36 |
|
22 |
| -## Nuxt Layers |
| 37 | +## Installation ⚙️ |
23 | 38 |
|
24 |
| -- app: Application Entry Layer, built with Nuxt UI components |
25 |
| -- firebase: Firebase Layer, with: |
26 |
| - - Plugins: Initialization of Firebase app and authentication |
27 |
| - - Pinia Store: Manages authentication state |
28 |
| - - Components: Related to authentication UI and logic |
29 |
| - - Composables: Handle authentication and Firestore operations |
30 |
| -- noop: `Noop` fallback layer used when Firebase is disabled |
31 |
| -- **ANALYZER**: `Main app logic layer` — all logic and calculations are handled in Pinia stores to keep logic UI-agnostic |
| 39 | +To set up the **ADHD Time Analyzer** locally, follow these steps: |
32 | 40 |
|
33 |
| -## Logic in a nutshell |
| 41 | +1. **Clone the Repository**: |
34 | 42 |
|
35 |
| -- `effective day start`: The first logs added during the day, with no more than a 2-minute gap between them, are counted as a streak to calculate this variable. |
36 |
| -- `effective night gap auto detect`: Searches for a potential gap between logs after midnight and the `day start` to determine which logs belong to which day for statistics. |
37 |
| -- The logic for dividing logs between days is in `useEdgeCases`. |
38 |
| -- Variables used in the logic can be found in `~/analyzer/utils/config/logic.ts`. |
39 |
| -- The statistics for today show the current tracked minutes since the beginning of the day and the variance between the tracked time and the time from the `effective day start`. |
40 |
| -- Statistics for previous days are already simplified. |
| 43 | + ```bash |
| 44 | + git clone https://github.com/Froozied/adhd-time-analyzer.git |
| 45 | + ``` |
41 | 46 |
|
42 |
| -_I'll write more about this here someday._ |
| 47 | +2. **Navigate to the Project Directory**: |
43 | 48 |
|
44 |
| -> 🙃 The dictionaries used in the app are highly subjective and currently hardcoded in `~/analyzer/data`. |
| 49 | + ```bash |
| 50 | + cd adhd-time-analyzer |
| 51 | + ``` |
45 | 52 |
|
46 |
| - |
| 53 | +3. **Install Dependencies**: |
47 | 54 |
|
48 |
| -## Settings |
| 55 | + Make sure you have Node.js installed. Then run: |
49 | 56 |
|
50 |
| -`.env` variable to control which option is used: |
| 57 | + ```bash |
| 58 | + npm install |
| 59 | + ``` |
51 | 60 |
|
52 |
| -``` |
53 |
| -USE_FIREBASE=false |
54 |
| -``` |
| 61 | +4. **Set Up Firebase**: |
55 | 62 |
|
56 |
| -> ⚠️ If you're working on the version **without Firebase**, it's better to simply delete the contents of the `firebase` directory. |
| 63 | + Create a Firebase project and set up authentication and Firestore. Add your Firebase config to the project. |
57 | 64 |
|
58 |
| -> ⚠️ `[vue-tsc]` doesn't handle this setup well — or I haven’t figured out how to configure it properly yet. |
| 65 | +5. **Run the Application**: |
59 | 66 |
|
60 |
| -## Development (no-DB version) |
| 67 | + Start the development server: |
61 | 68 |
|
62 |
| -As mentioned above, if you're not using Firebase, you can either remove the Firebase layer entirely, |
63 |
| -or disable TypeScript strict mode in the `nuxt.config.ts` file of the `App Layer`. |
| 69 | + ```bash |
| 70 | + npm run dev |
| 71 | + ``` |
64 | 72 |
|
65 |
| -```bash |
66 |
| -pnpm install |
67 |
| -cd app |
68 |
| -pnpm run dev |
69 |
| -``` |
| 73 | + Open your browser and navigate to `http://localhost:3000`. |
70 | 74 |
|
71 |
| -## Development (`Firebase Auth` + `Firestore` version) |
| 75 | +## Usage 📊 |
72 | 76 |
|
73 |
| -Configure your Firebase project at [console.firebase.google.com](https://console.firebase.google.com). |
74 |
| -You will need to create a web app, initialize Authentication with the **Email/Password** sign-in method, create a user, and initialize Firestore. |
75 |
| -Then, download your app's configuration settings and copy them into the `firebaseConfig.ts` file. |
| 77 | +After setting up the application, you can start using it to track your time. Here’s how: |
76 | 78 |
|
77 |
| -Rename `utils/firebaseConfig.example.ts` to `utils/firebaseConfig.ts`, and update it with your app's information. |
| 79 | +1. **Sign In**: Use your Firebase credentials to log in. |
| 80 | +2. **Start a Pomodoro Session**: Click the start button to begin your work session. |
| 81 | +3. **Track Your Breaks**: After each session, take a short break to recharge. |
| 82 | +4. **View Statistics**: Check your productivity stats to see how you’re doing over time. |
78 | 83 |
|
79 |
| -`.env` variable to control which option is used, turn it on: |
| 84 | +## Contributing 🤝 |
80 | 85 |
|
81 |
| -``` |
82 |
| -USE_FIREBASE=true |
83 |
| -``` |
| 86 | +We welcome contributions to improve the **ADHD Time Analyzer**. If you’d like to contribute, please follow these steps: |
84 | 87 |
|
85 |
| -Then, proceed as usual with Nuxt: |
| 88 | +1. **Fork the Repository**. |
| 89 | +2. **Create a New Branch**: |
86 | 90 |
|
87 |
| -```bash |
88 |
| -pnpm install |
89 |
| -cd app |
90 |
| -pnpm run dev |
91 |
| -``` |
| 91 | + ```bash |
| 92 | + git checkout -b feature/YourFeature |
| 93 | + ``` |
92 | 94 |
|
93 |
| -Start the development server on [http://localhost:3000](http://localhost:3000) |
| 95 | +3. **Make Your Changes**. |
| 96 | +4. **Commit Your Changes**: |
94 | 97 |
|
95 |
| -## Documentations |
| 98 | + ```bash |
| 99 | + git commit -m "Add some feature" |
| 100 | + ``` |
96 | 101 |
|
97 |
| -- Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. |
98 |
| -- Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
99 |
| -- [Firebase Authentication](https://firebase.google.com/docs/auth) [web documentation](https://firebase.google.com/docs/auth/web/start) |
100 |
| -- [Nuxt UI](https://ui.nuxt.com/) |
101 |
| -- Nuxt Ui using [TanStack Table](https://tanstack.com/table/latest/docs/framework/vue/vue-table#usevuetable) is widely used throughout the project |
102 |
| -- [@nuxt/eslint](https://eslint.nuxt.com/packages/module) |
103 |
| -- [typescript && vue-tsc](https://nuxt.com/docs/guide/concepts/typescript) |
| 102 | +5. **Push to the Branch**: |
| 103 | + |
| 104 | + ```bash |
| 105 | + git push origin feature/YourFeature |
| 106 | + ``` |
| 107 | + |
| 108 | +6. **Open a Pull Request**. |
| 109 | + |
| 110 | +For more detailed guidelines, check our [CONTRIBUTING.md](CONTRIBUTING.md) file. |
| 111 | + |
| 112 | +## License 📄 |
| 113 | + |
| 114 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
| 115 | + |
| 116 | +## Contact 📬 |
| 117 | + |
| 118 | +For questions or feedback, feel free to reach out: |
| 119 | + |
| 120 | +- **Email**: your-email@example.com |
| 121 | +- **GitHub**: [Froozied](https://github.com/Froozied) |
| 122 | + |
| 123 | +We encourage you to explore our [Releases](https://github.com/Froozied/adhd-time-analyzer/releases) section for the latest updates and versions. |
| 124 | + |
| 125 | +Thank you for checking out the **ADHD Time Analyzer**! We hope it helps you stay focused and productive. |
0 commit comments