diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c530e74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata +# Ignore folders generated by Bundler +.bundle/ +vendor/ + +# System files +.DS_Store +Thumbs.db +ehthumbs.db +Icon? +._* diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..9c9e4c9 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +app.tirkio.com \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9a301cb --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Tirkio + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d027039 --- /dev/null +++ b/README.md @@ -0,0 +1,131 @@ +# TiRKiO Finance + +**TiRKiO Finance** is a Progressive Web Application (PWA) designed for personal finance management. The app provides a seamless and native-like experience for users, combining the power of Onsen UI, Firebase, Jekyll, and GitHub Pages. Hosted on [app.tirkio.com](https://app.tirkio.com), this application enables users to track and manage their finances effectively. + +--- + +## **Features** + +- **PWA Functionality**: + - Installable on mobile and desktop devices. + - Works offline with cached resources. +- **Native-Like UI**: + - Built with Onsen UI for a polished iOS/Android experience. +- **Firebase Integration**: + - Authentication for secure access. + - Cloud Firestore for storing and retrieving financial data. +- **Responsive Design**: + - Fully functional on mobile, tablet, and desktop devices. +- **Modular Navigation**: + - Tab-based navigation for key finance areas: + - Vermögen (Wealth) + - Rückställungen (Provisions) + - Anlagen (Investments) + - Vorsorge (Retirement) + +--- + +## **Technology Stack** + +1. **Frontend**: + - [Onsen UI](https://onsen.io/): Native-like UI components. + - [Jekyll](https://jekyllrb.com/): Static site generator. +2. **Backend**: + - [Firebase](https://firebase.google.com/): Authentication and Firestore database. +3. **Hosting**: + - [GitHub Pages](https://pages.github.com/): Free and easy static site hosting. + +--- + +## **Project Structure** + +``` +tirkio-finance/ +├── _layouts/ # Jekyll layouts +│ └── default.html # Main layout file +├── assets/ +│ ├── css/ +│ │ └── style.css # Custom styles +│ ├── js/ +│ │ ├── firebase.js # Firebase configuration and logic +│ │ └── service-worker.js # Service worker for offline support +├── index.html # Main entry point +├── manifest.json # PWA manifest +├── wealth.html # Wealth section +├── provisions.html # Provisions section +├── investments.html # Investments section +├── retirement.html # Retirement section +``` + +--- + +## **Setup and Installation** + +### **1. Clone the Repository** +```bash +git clone https://github.com/tirkio/app.tirkio.com.git +cd app.tirkio.com +``` + +### **2. Firebase Setup** +1. Go to [Firebase Console](https://console.firebase.google.com/) and create a project. +2. Set up Authentication (e.g., Email/Password or Google Sign-In). +3. Enable Cloud Firestore. +4. Replace `firebase.js` configuration with your Firebase project credentials. + +```javascript +const firebaseConfig = { + apiKey: "YOUR_API_KEY", + authDomain: "YOUR_PROJECT_ID.firebaseapp.com", + projectId: "YOUR_PROJECT_ID", + storageBucket: "YOUR_PROJECT_ID.appspot.com", + messagingSenderId: "YOUR_SENDER_ID", + appId: "YOUR_APP_ID" +}; +``` + +### **3. Deploy to GitHub Pages** +1. Push the project to a GitHub repository. +2. Go to the repository’s **Settings > Pages** and enable GitHub Pages. +3. Set the branch to `main` and folder to `/root`. +4. Your app will be live at `https://github.com/tirkio/app.tirkio.com.git`. + +--- + +## **Usage** + +### **Key Sections** +- **Vermögen** (Wealth): + - Track and manage your wealth. +- **Rückställungen** (Provisions): + - Monitor provisions and obligations. +- **Anlagen** (Investments): + - Analyze and plan your investments. +- **Vorsorge** (Retirement): + - Plan for retirement securely. + +### **Offline Support** +- The app uses a service worker (`service-worker.js`) to cache essential resources and enable offline functionality. + +--- + +## **Contributing** + +We welcome contributions to enhance the app. To contribute: +1. Fork the repository. +2. Create a feature branch: `git checkout -b feature-name`. +3. Commit your changes: `git commit -m 'Add feature'`. +4. Push to the branch: `git push origin feature-name`. +5. Open a Pull Request. + +--- + +## **License** + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +--- + +## **Contact** + +For any questions or feedback, feel free to reach out on GitHub. diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..24eb1ca --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..f1e9f89 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,64 @@ + + + + + + {{ page.title }} - TiRKiO Finance + + + + + + + + + + {{ content }} + + {% include footer.html %} + + + + + \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..d564269 --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,6 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + background-color: #f5f5f5; + color: #333; +} diff --git a/assets/js/firebase-auth.js b/assets/js/firebase-auth.js new file mode 100644 index 0000000..2832bc6 --- /dev/null +++ b/assets/js/firebase-auth.js @@ -0,0 +1,12 @@ +// Initialize Firebase (Ensure this is loaded before other scripts that use Firebase) +const firebaseConfig = { + apiKey: "AIzaSyDINDQ8gwkSBgzQP1hwXsll6byIOWcKmtU", + authDomain: "tirkio-c3cdb.firebaseapp.com", + projectId: "tirkio-c3cdb", + storageBucket: "tirkio-c3cdb.firebasestorage.app", + messagingSenderId: "4329063605", + appId: "1:4329063605:web:88f807998de584a760aafc", + measurementId: "G-D259PRVH67" +}; + +firebase.initializeApp(firebaseConfig); diff --git a/assets/js/firebase.js b/assets/js/firebase.js new file mode 100644 index 0000000..1a904ea --- /dev/null +++ b/assets/js/firebase.js @@ -0,0 +1,62 @@ +// Firebase-Konfiguration +import { initializeApp } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-app.js"; +import { getFirestore, collection, addDoc, getDocs } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-firestore.js"; +import { getAnalytics } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-analytics.js"; +import { getAuth, signInWithEmailAndPassword, createUserWithEmailAndPassword, signOut } from "https://www.gstatic.com/firebasejs/11.1.0/firebase-auth.js"; + +const firebaseConfig = { + apiKey: "AIzaSyDINDQ8gwkSBgzQP1hwXsll6byIOWcKmtU", + authDomain: "tirkio-c3cdb.firebaseapp.com", + projectId: "tirkio-c3cdb", + storageBucket: "tirkio-c3cdb.firebasestorage.app", + messagingSenderId: "4329063605", + appId: "1:4329063605:web:88f807998de584a760aafc", + measurementId: "G-D259PRVH67" +}; + +const app = initializeApp(firebaseConfig); +const db = getFirestore(app); +const analytics = getAnalytics(app); +const auth = getAuth(app); + +// Authentifizierungsfunktionen +export async function login(email, password) { + try { + const userCredential = await signInWithEmailAndPassword(auth, email, password); + return userCredential.user; + } catch (error) { + console.error("Login fehlgeschlagen:", error); + throw error; + } +} + +export async function register(email, password) { + try { + const userCredential = await createUserWithEmailAndPassword(auth, email, password); + return userCredential.user; + } catch (error) { + console.error("Registrierung fehlgeschlagen:", error); + throw error; + } +} + +export async function logout() { + try { + await signOut(auth); + console.log("Erfolgreich abgemeldet"); + } catch (error) { + console.error("Abmeldung fehlgeschlagen:", error); + throw error; + } +} + +// Funktionen für Vermögensdaten +export async function addWealthItem(userId, item) { + const docRef = await addDoc(collection(db, ), item); + return docRef.id; +} + +export async function getWealthItems(userId) { + const querySnapshot = await getDocs(collection(db, )); + return querySnapshot.docs.map(doc => ({ id: doc.id, ...doc.data() })); +} diff --git a/assets/js/service-worker.js b/assets/js/service-worker.js new file mode 100644 index 0000000..e118a9e --- /dev/null +++ b/assets/js/service-worker.js @@ -0,0 +1,20 @@ +self.addEventListener('install', event => { + event.waitUntil( + caches.open('tirkio-cache-v1').then(cache => { + return cache.addAll([ + '/index.html', + '/wealth.html', + '/assets/css/style.css', + '/assets/js/firebase.js' + ]); + }) + ); +}); + +self.addEventListener('fetch', event => { + event.respondWith( + caches.match(event.request).then(response => { + return response || fetch(event.request); + }) + ); +}); diff --git a/firestore.rules b/firestore.rules new file mode 100644 index 0000000..bb55c3a --- /dev/null +++ b/firestore.rules @@ -0,0 +1,8 @@ +rules_version = '2'; +service cloud.firestore { + match /databases/{database}/documents { + match /wealth/{document=**} { + allow read, write: if request.auth != null && request.auth.uid == resource.data.userId; + } + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..00166bf --- /dev/null +++ b/index.html @@ -0,0 +1,34 @@ +--- +layout: default +title: TiRKiO Finance +--- + + + + + diff --git a/investments.md b/investments.md new file mode 100644 index 0000000..d38b838 --- /dev/null +++ b/investments.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Anlagen +--- + + +
+ Zurück +
+
Anlagen
+
+
+

Deine Anlagen

+

Hier kannst du deine Anlagen analysieren und verwalten.

+
+
diff --git a/login.html b/login.html new file mode 100644 index 0000000..f0b71cf --- /dev/null +++ b/login.html @@ -0,0 +1,35 @@ +--- +layout: default +title: Login +--- + + +
Login
+
+
+
+
+ Einloggen +

Noch kein Konto? Registrieren

+
+
+ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..0e03e0e --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "TiRKiO Finance", + "short_name": "TiRKiO", + "start_url": "/index.html", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#007bff", + "icons": [ + { + "src": "/assets/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/assets/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/provisions.md b/provisions.md new file mode 100644 index 0000000..bc86ce3 --- /dev/null +++ b/provisions.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Rückstellungen +--- + + +
+ Zurück +
+
Rückstellungen
+
+
+

Deine Rückstellungen

+

Hier kannst du deine Rückstellungen einsehen und planen.

+
+
diff --git a/retirement.md b/retirement.md new file mode 100644 index 0000000..bd80e60 --- /dev/null +++ b/retirement.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Vorsorge +--- + + +
+ Zurück +
+
Vorsorge
+
+
+

Deine Vorsorge

+

Hier kannst du deine Vorsorge überprüfen und planen.

+
+
diff --git a/signup.html b/signup.html new file mode 100644 index 0000000..e93dc45 --- /dev/null +++ b/signup.html @@ -0,0 +1,37 @@ +--- +layout: default +title: Registrieren +--- + + +
Registrieren
+
+ Zurück +
+
+
+
+
+ Registrieren +
+
+ diff --git a/wealth.html b/wealth.html new file mode 100644 index 0000000..04e9ff9 --- /dev/null +++ b/wealth.html @@ -0,0 +1,13 @@ + + +
+ Zurück +
+
Vermögen
+
+
+

Dein Vermögen

+
+
+
+
\ No newline at end of file