added .gitignore to project root

This commit is contained in:
michael 2025-10-16 17:24:39 -05:00
parent aac7a52be4
commit a0d34a57ad
29 changed files with 161 additions and 9 deletions

86
.gitignore vendored Normal file
View file

@ -0,0 +1,86 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.venv/
venv/
ENV/
env/
.env/
# Python IDEs
.pytype/
.mypy_cache/
.dmypy.json
dmypy.json
# Environment files
.env
.env.local
.env.*.local
*.env
# Database
*.db
*.sqlite
*.sqlite3
# Logs
*.log
logs/
# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.project
.classpath
.settings/
*.sublime-*
# Generated podcasts
backend/*.mp3
backend/*.wav
# Temporary files
*.tmp
*.temp
tmp/
temp/
# UV lock file (Python package manager)
# uv.lock - Uncomment if you want to ignore this
# Docker
docker-compose.override.yml

View file

@ -121,7 +121,7 @@ npm run dev
| Service | URL | Credentials |
|---------|-----|-------------|
| **Frontend** | http://localhost:4000 | Create account on signup |
| **Frontend** | http://localhost:4000 | Use Microsoft SSO or local login |
| **Backend API** | http://localhost:9000 | - |
| **API Documentation** | http://localhost:9000/docs | - |
| **Database UI (Adminer)** | http://localhost:9001 | System: PostgreSQL<br>Server: postgres<br>Username: postgres<br>Password: admin<br>Database: postgres_nextjs |
@ -132,7 +132,7 @@ npm run dev
## 📚 Features
### Core Features
- ✅ **User Authentication** - Secure signup/login with role-based access + Microsoft SSO
- ✅ **User Authentication** - Secure login with role-based access + Microsoft SSO
- ✅ **Admin System** - Admin users can manage platform
- ✅ **Multi-Notebook Management** - Organize documents into collections
- ✅ **6 AI Models** - GPT-5, Claude 4.5, Gemini 2.5 Pro, GPT-4o, Gemini Flash, GPT-4
@ -272,12 +272,26 @@ NEXT_PUBLIC_AZURE_REDIRECT_URI=https://ai-sandbox.oliver.solutions/notebookllama
### First Time Setup
**1. Create Admin Account:**
- Go to http://localhost:4000
- Click "Sign up"
- Email: your@email.com
- Username: yourusername
- Password: (8+ characters)
**1. Create Admin Account (via API or database):**
Option A - Via curl:
```bash
curl -X POST "http://localhost:9000/api/auth/signup" \
-H "Content-Type: application/json" \
-d '{"email":"your@email.com","username":"yourusername","password":"yourpassword"}'
```
Option B - Via database:
```bash
cd backend
uv run python -c "
import sys
sys.path.insert(0, 'src/notebookllama')
from auth import create_user
user = create_user('your@email.com', 'yourusername', 'yourpassword')
print(f'Created user: {user.email}' if user else 'Failed to create user')
"
```
**2. Set as Admin (via database):**
```bash
@ -544,7 +558,7 @@ curl -X PUT "http://localhost:9000/api/admin/users/USER_ID/role?is_admin=true&re
- **Password Hashing:** bcrypt for local users
- **Microsoft SSO:** MSAL with PKCE flow, token validation via Microsoft Graph API
- **Account Merging:** Local accounts automatically upgraded to SSO on first Microsoft login
- **Protected Routes:** Authentication required for all pages except /login, /signup
- **Protected Routes:** Authentication required for all pages except /login
- **Role-Based Access:** Admin-only pages
- **CORS:** Configured for localhost:4000
- **SQL Injection Protection:** SQLAlchemy ORM

52
backend/.gitignore vendored Normal file
View file

@ -0,0 +1,52 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
# Virtual environments
.venv/
venv/
ENV/
env/
# Environment files
.env
.env.local
.env.production
.env.*.local
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# Generated files
*.mp3
*.wav
# Logs
*.log
logs/
# Testing
.pytest_cache/
.coverage
htmlcov/
# Type checking
.mypy_cache/
.dmypy.json
dmypy.json
.pytype/
# Distribution / packaging
*.egg-info/
dist/
build/
# OS
.DS_Store