Add initial setup files for Tailwind CSS and PostCSS, including global styles and TypeScript configuration

This commit is contained in:
Poyraz Avsever
2026-04-27 23:37:00 +03:00
parent 2d217985a2
commit cd382f60ba
5 changed files with 151 additions and 105 deletions
+61 -105
View File
@@ -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
[![Ollama](https://img.shields.io/badge/Ollama-Local%20LLM-111827?style=for-the-badge)](https://docs.ollama.com/quickstart)
[![Gemini 3 Preview](https://img.shields.io/badge/Gemini%203-Preview-0f766e?style=for-the-badge)](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/get-started-with-gemini-3)
[![Google Cloud](https://img.shields.io/badge/Google%20Cloud-Vertex%20AI-1a73e8?style=for-the-badge)](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/quickstart)
## Teknolojiler
</div>
- Next.js
- TypeScript
- Tailwind CSS
- Recharts
- Framer Motion
```text
____ ____ _ _ _____ _ _ _ __ _ ____ ___ _
| _ \| _ \ | | | | ___| | | | |/ / / \ / ___|_ _| |
| | | | |_) | | | | | |_ | | | | ' / / _ \ \___ \| || |
| |_| | _ < | |_| | _| | |_| | . \ / ___ \ ___) | || |___
|____/|_| \_\ \___/|_| \___/|_|\_\ /_/ \_\____/___|_____|
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 !
## Kurulum
```bash
npm install
```
> [!IMPORTANT]
> Gemini 3 preview "indirilen bir program" degil, Google Cloud Vertex AI uzerinden API ile kullanilan bir model ailesidir.
## Gelistirme
## 0) Ogrenci Icin Tek Adim
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
```bash
npm run dev
```
### Proje ve API ayari
Uygulama varsayilan olarak `http://localhost:3000` adresinde calisir.
```powershell
gcloud config set project YOUR_PROJECT_ID
gcloud services enable aiplatform.googleapis.com
## Production Build
```bash
npm run build
npm run start
```
### Python SDK kurulumu
## MVP Kapsami
```powershell
pip install --upgrade google-genai
Dahil:
- 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
+35
View File
@@ -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;
}
+8
View File
@@ -0,0 +1,8 @@
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
export default config;
+23
View File
@@ -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;
+24
View File
@@ -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"]
}