Add initial setup files for Tailwind CSS and PostCSS, including global styles and TypeScript configuration
This commit is contained in:
@@ -1,121 +1,77 @@
|
|||||||
# AI Asistan Kampusu
|
# Mood Tracker MVP
|
||||||
|
|
||||||
<div align="center">
|
Mood Tracker, gunluk ruh hali ve enerji seviyesini kaydedip basit grafiklerle
|
||||||
|
gorsellestiren minimal bir veri gorsellestirme uygulamasidir.
|
||||||
|
|
||||||
### Sekilli Sukullu Ogrenci Baslangic Rehberi
|
## Ozellikler
|
||||||
|
|
||||||
`Local AI + Cloud AI = Daha hizli ogrenme`
|
- Gunluk tarih, ruh hali ve enerji seviyesi girisi
|
||||||
|
- Ayni tarih icin mevcut kaydi guncelleme
|
||||||
|
- Tarayici `localStorage` uzerinde veri saklama
|
||||||
|
- Mood score ve enerji icin line chart
|
||||||
|
- Mood kategorileri icin pie chart
|
||||||
|
- Basit kuralli insight mesajlari
|
||||||
|
- Mobil uyumlu tek sayfalik dashboard
|
||||||
|
|
||||||
[](https://docs.ollama.com/quickstart)
|
## Teknolojiler
|
||||||
[](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/get-started-with-gemini-3)
|
|
||||||
[](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/quickstart)
|
|
||||||
|
|
||||||
</div>
|
- Next.js
|
||||||
|
- TypeScript
|
||||||
|
- Tailwind CSS
|
||||||
|
- Recharts
|
||||||
|
- Framer Motion
|
||||||
|
|
||||||
```text
|
## Kurulum
|
||||||
____ ____ _ _ _____ _ _ _ __ _ ____ ___ _
|
|
||||||
| _ \| _ \ | | | | ___| | | | |/ / / \ / ___|_ _| |
|
```bash
|
||||||
| | | | |_) | | | | | |_ | | | | ' / / _ \ \___ \| || |
|
npm install
|
||||||
| |_| | _ < | |_| | _| | |_| | . \ / ___ \ ___) | || |___
|
|
||||||
|____/|_| \_\ \___/|_| \___/|_|\_\ /_/ \_\____/___|_____|
|
|
||||||
K K L U U BBBB EEEEE H H OOO SSSS GGG EEEEE L DDDD IIIII N N !
|
|
||||||
K K L U U B B E H H O O S G E L D D I NN N !
|
|
||||||
KKK L U U BBBB EEE HHHHH O O SSS G GG EEE L D D I N N N !
|
|
||||||
K K L U U B B E H H O O S G G E L D D I N NN
|
|
||||||
K K LLLLL UUU BBBB EEEEE H H OOO SSSS GGG EEEEE LLLLL DDDD IIIII N N !
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!IMPORTANT]
|
## Gelistirme
|
||||||
> Gemini 3 preview "indirilen bir program" degil, Google Cloud Vertex AI uzerinden API ile kullanilan bir model ailesidir.
|
|
||||||
|
|
||||||
## 0) Ogrenci Icin Tek Adim
|
```bash
|
||||||
|
npm run dev
|
||||||
1. Ollama'yi bir kez kur: https://docs.ollama.com/windows models kısmına gir https://ollama.com/library ve gemini 3 preview cloud modelinini çalıştır yetki giriş gerekecek. ollama artık lokalinde bir LLM olarak sana hizmet vermeye hazır .
|
|
||||||
|
|
||||||
2. Bu klasorde sadece `BASLAT.bat` calistir.
|
|
||||||
3. Hepsi bu kadar.
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> Ogrenci tarafinda ekstra komut gerekmez. `BASLAT.bat` gerekli durumda `kurulum.bat` dosyasini otomatik cagirir ve ortami kendi kurar.
|
|
||||||
|
|
||||||
## 1) BASLAT Calisinca Ne Oluyor?
|
|
||||||
|
|
||||||
1. `BASLAT.bat` önce `.venv` var mi kontrol eder.
|
|
||||||
2. Yoksa `kurulum.bat` otomatik calisir; Python 3 kontrolu, `.venv` olusturma, `pip` guncelleme ve `requirements.txt` paket kurulumu yapilir.
|
|
||||||
3. Sonra `main.pyw` arka planda acilir.
|
|
||||||
4. Uygulama varsayilan olarak `gemma3:1b` modeliyle Ollama'ya istek atar.
|
|
||||||
|
|
||||||
Ollama API varsayilan adresi: `http://localhost:11434`
|
|
||||||
|
|
||||||
## 2) Google Cloud Gemini 3 Preview (Vertex AI)
|
|
||||||
|
|
||||||
### Once gerekli olanlar
|
|
||||||
- Google Cloud projesi
|
|
||||||
- Billing acik olmali
|
|
||||||
- Vertex AI API aktif olmali
|
|
||||||
- `gcloud` CLI kurulu olmali
|
|
||||||
|
|
||||||
### gcloud giris ve kimlik
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
gcloud init
|
|
||||||
gcloud auth application-default login
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Proje ve API ayari
|
Uygulama varsayilan olarak `http://localhost:3000` adresinde calisir.
|
||||||
|
|
||||||
```powershell
|
## Production Build
|
||||||
gcloud config set project YOUR_PROJECT_ID
|
|
||||||
gcloud services enable aiplatform.googleapis.com
|
```bash
|
||||||
|
npm run build
|
||||||
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
### Python SDK kurulumu
|
## MVP Kapsami
|
||||||
|
|
||||||
```powershell
|
Dahil:
|
||||||
pip install --upgrade google-genai
|
|
||||||
|
- Mood secimi
|
||||||
|
- Enerji seviyesi secimi
|
||||||
|
- LocalStorage kayit
|
||||||
|
- Line chart
|
||||||
|
- Pie chart
|
||||||
|
- Basit insight
|
||||||
|
|
||||||
|
Dahil degil:
|
||||||
|
|
||||||
|
- Kullanici girisi
|
||||||
|
- Cloud sync
|
||||||
|
- Bildirim sistemi
|
||||||
|
- Sosyal paylasim
|
||||||
|
- PDF rapor
|
||||||
|
- AI destekli yorumlama
|
||||||
|
- Dark mode
|
||||||
|
- Heatmap
|
||||||
|
|
||||||
|
## Veri Modeli
|
||||||
|
|
||||||
|
```ts
|
||||||
|
type MoodEntry = {
|
||||||
|
id: string;
|
||||||
|
date: string;
|
||||||
|
mood: "happy" | "neutral" | "sad" | "angry";
|
||||||
|
mood_score: 4 | 3 | 2 | 1;
|
||||||
|
energy: 1 | 2 | 3 | 4 | 5;
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Ortam degiskenleri (PowerShell)
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$env:GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
|
|
||||||
$env:GOOGLE_CLOUD_LOCATION="global"
|
|
||||||
$env:GOOGLE_GENAI_USE_VERTEXAI="True"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Ilk Gemini 3 Preview istegi
|
|
||||||
|
|
||||||
```python
|
|
||||||
from google import genai
|
|
||||||
|
|
||||||
client = genai.Client()
|
|
||||||
|
|
||||||
response = client.models.generate_content(
|
|
||||||
model="gemini-3-flash-preview",
|
|
||||||
contents="Merhaba! Bana 3 maddede Python'da for dongusunu anlat.",
|
|
||||||
)
|
|
||||||
|
|
||||||
print(response.text)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## 3) Mini Ogrenci Challenge (Opsiyonel)
|
|
||||||
1. Terminalde su komutu yaz: `ollama run gemini-3-flash-preview`
|
|
||||||
2. Sonra Ollama'da gecerli bir modelle sor: `ollama run gemma3:1b`
|
|
||||||
3. Ayni soruyu Gemini 3 preview ile sor.
|
|
||||||
4. Cevaplari hiz, detay ve dogruluk acisindan karsilastir.
|
|
||||||
|
|
||||||
## 4) Hata Cozme Kisa Notlari
|
|
||||||
- `403` alirsan: Billing, Vertex AI API ve IAM rol (`roles/aiplatform.user`) kontrol et.
|
|
||||||
- `401` alirsan: `gcloud auth application-default login` komutunu yeniden calistir.
|
|
||||||
- `ollama model not found` alirsan once su komutu calistir: `ollama run gemma3:1b`
|
|
||||||
- `Model not found` alirsan: model ID'yi kontrol et (`gemini-3-flash-preview`, `gemini-3-pro-preview`, `gemini-3.1-pro-preview`).
|
|
||||||
|
|
||||||
## Kaynaklar (Resmi)
|
|
||||||
- Ollama Quickstart: https://docs.ollama.com/quickstart
|
|
||||||
- Ollama Windows: https://docs.ollama.com/windows
|
|
||||||
- Ollama Linux: https://docs.ollama.com/linux
|
|
||||||
- Vertex AI Quickstart: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/quickstart
|
|
||||||
- Gemini 3 Baslangic: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/get-started-with-gemini-3
|
|
||||||
- Gemini 3 Pro Model: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro
|
|
||||||
- Gemini 3 Flash Model: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-flash
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
:root {
|
||||||
|
color-scheme: light;
|
||||||
|
background: #f5f7f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(47, 125, 99, 0.08), transparent 34%),
|
||||||
|
linear-gradient(315deg, rgba(216, 100, 74, 0.08), transparent 30%),
|
||||||
|
#f5f7f4;
|
||||||
|
color: #17211f;
|
||||||
|
font-family:
|
||||||
|
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
||||||
|
sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
const config = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import type { Config } from "tailwindcss";
|
||||||
|
|
||||||
|
const config: Config = {
|
||||||
|
content: ["./app/**/*.{js,ts,jsx,tsx,mdx}"],
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
ink: "#17211f",
|
||||||
|
mist: "#f5f7f4",
|
||||||
|
leaf: "#2f7d63",
|
||||||
|
coral: "#d8644a",
|
||||||
|
sun: "#e3aa38",
|
||||||
|
sky: "#4f7fbf",
|
||||||
|
},
|
||||||
|
boxShadow: {
|
||||||
|
soft: "0 18px 50px rgba(23, 33, 31, 0.08)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2017",
|
||||||
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
"allowJs": false,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"incremental": true,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user