init : initial repo setup[200~
- Create monorepo structure (backend, frontend, infrastructure, docs) - Add comprehensive .gitignore for Go and Node.js - Add detailed README with quick start guide - Add PR template for standardized code reviews - Add issue templates for bugs and features - Setup branch structure (main, develop) This commit establishes the foundation for all future development. Story: E1-001 - Project Repository Setup~
This commit is contained in:
commit
6187036bc5
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: Report a bug to help us improve
|
||||||
|
title: '[BUG] '
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🐛 Bug Description
|
||||||
|
|
||||||
|
<!-- A clear and concise description of the bug -->
|
||||||
|
|
||||||
|
## 🔁 Steps to Reproduce
|
||||||
|
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '...'
|
||||||
|
3. Scroll down to '...'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
## ✅ Expected Behavior
|
||||||
|
|
||||||
|
<!-- What should happen -->
|
||||||
|
|
||||||
|
## ❌ Actual Behavior
|
||||||
|
|
||||||
|
<!-- What actually happens -->
|
||||||
|
|
||||||
|
## 📸 Screenshots
|
||||||
|
|
||||||
|
<!-- If applicable, add screenshots -->
|
||||||
|
|
||||||
|
## 🖥️ Environment
|
||||||
|
|
||||||
|
- OS: [e.g., macOS 14.0, Ubuntu 22.04]
|
||||||
|
- Browser: [e.g., Chrome 119, Safari 17]
|
||||||
|
- Version: [e.g., v6.2.0]
|
||||||
|
|
||||||
|
## 📋 Additional Context
|
||||||
|
|
||||||
|
<!-- Any other relevant information -->
|
||||||
|
|
||||||
|
## 🔍 Possible Solution
|
||||||
|
|
||||||
|
<!-- If you have ideas on how to fix this -->
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest a new feature
|
||||||
|
title: '[FEATURE] '
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✨ Feature Description
|
||||||
|
|
||||||
|
<!-- Clear description of the feature -->
|
||||||
|
|
||||||
|
## 🎯 Problem It Solves
|
||||||
|
|
||||||
|
<!-- What problem does this solve? -->
|
||||||
|
|
||||||
|
## 💡 Proposed Solution
|
||||||
|
|
||||||
|
<!-- How should it work? -->
|
||||||
|
|
||||||
|
## 🔄 Alternatives Considered
|
||||||
|
|
||||||
|
<!-- Other approaches you've thought about -->
|
||||||
|
|
||||||
|
## 📊 Priority
|
||||||
|
|
||||||
|
- [ ] High (blocks other work)
|
||||||
|
- [ ] Medium (important but not blocking)
|
||||||
|
- [ ] Low (nice to have)
|
||||||
|
|
||||||
|
## 📎 Additional Context
|
||||||
|
|
||||||
|
<!-- Screenshots, mockups, examples -->
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
## 📝 Description
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Provide a clear and concise description of what this PR does.
|
||||||
|
Include the motivation and context for the change.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### What changed?
|
||||||
|
<!-- Describe the changes in bullet points -->
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
||||||
|
### Why was this change needed?
|
||||||
|
<!-- Explain the problem this PR solves -->
|
||||||
|
|
||||||
|
|
||||||
|
## 🎫 Related Issue
|
||||||
|
|
||||||
|
<!-- Link to the Jira ticket or GitHub issue -->
|
||||||
|
Closes AUR-XXX
|
||||||
|
<!-- or -->
|
||||||
|
Related to #XXX
|
||||||
|
|
||||||
|
## 🔄 Type of Change
|
||||||
|
|
||||||
|
<!-- Mark the relevant option with an 'x' -->
|
||||||
|
|
||||||
|
- [ ] 🐛 Bug fix (non-breaking change fixing an issue)
|
||||||
|
- [ ] ✨ New feature (non-breaking change adding functionality)
|
||||||
|
- [ ] 💥 Breaking change (fix or feature causing existing functionality to break)
|
||||||
|
- [ ] 📝 Documentation update
|
||||||
|
- [ ] 🎨 Style/UI change (non-functional change)
|
||||||
|
- [ ] ♻️ Code refactoring (no functional changes)
|
||||||
|
- [ ] ⚡ Performance improvement
|
||||||
|
- [ ] ✅ Test addition/improvement
|
||||||
|
- [ ] 🔧 Configuration change
|
||||||
|
|
||||||
|
## 🧪 Testing
|
||||||
|
|
||||||
|
### How has this been tested?
|
||||||
|
|
||||||
|
<!-- Describe the tests you ran to verify your changes -->
|
||||||
|
|
||||||
|
**Test Environment:**
|
||||||
|
- OS: <!-- e.g., macOS, Ubuntu 22.04, Windows 11 -->
|
||||||
|
- Browser: <!-- e.g., Chrome 119, Safari 17, Firefox 120 -->
|
||||||
|
- Go version: <!-- e.g., 1.21.5 -->
|
||||||
|
- Node version: <!-- e.g., 18.18.0 -->
|
||||||
|
|
||||||
|
**Test Scenarios:**
|
||||||
|
<!-- List the scenarios you tested -->
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
### Test Results
|
||||||
|
|
||||||
|
- [ ] All existing unit tests pass (`make test` / `npm test`)
|
||||||
|
- [ ] All existing integration tests pass
|
||||||
|
- [ ] New unit tests added (if applicable)
|
||||||
|
- [ ] New integration tests added (if applicable)
|
||||||
|
- [ ] Manual testing completed
|
||||||
|
- [ ] Edge cases tested
|
||||||
|
- [ ] Error handling tested
|
||||||
|
|
||||||
|
## 📸 Screenshots/Videos
|
||||||
|
|
||||||
|
<!--
|
||||||
|
For UI changes, add screenshots or videos showing before/after.
|
||||||
|
You can drag and drop images directly into this text area.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Before
|
||||||
|
<!-- Screenshot of old behavior -->
|
||||||
|
|
||||||
|
### After
|
||||||
|
<!-- Screenshot of new behavior -->
|
||||||
|
|
||||||
|
## ✅ Checklist
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
|
||||||
|
- [ ] Code follows project style guidelines
|
||||||
|
- [ ] Self-review of code completed
|
||||||
|
- [ ] Comments added for complex/non-obvious code
|
||||||
|
- [ ] No debugging code left in (console.log, print statements)
|
||||||
|
- [ ] No commented-out code (unless with explanation)
|
||||||
|
- [ ] Variable and function names are descriptive
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- [ ] README updated (if needed)
|
||||||
|
- [ ] API documentation updated (if endpoints changed)
|
||||||
|
- [ ] Code comments added for public APIs
|
||||||
|
- [ ] CHANGELOG updated (for user-facing changes)
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
|
||||||
|
- [ ] Tests added/updated for changes
|
||||||
|
- [ ] All tests passing locally
|
||||||
|
- [ ] Code coverage not decreased
|
||||||
|
- [ ] Edge cases covered by tests
|
||||||
|
|
||||||
|
### Security & Performance
|
||||||
|
|
||||||
|
- [ ] No hardcoded secrets or credentials
|
||||||
|
- [ ] Input validation added where needed
|
||||||
|
- [ ] SQL injection protection verified (if DB changes)
|
||||||
|
- [ ] XSS protection verified (if frontend changes)
|
||||||
|
- [ ] No performance degradation
|
||||||
|
- [ ] Database queries optimized (if applicable)
|
||||||
|
|
||||||
|
### Database (if applicable)
|
||||||
|
|
||||||
|
- [ ] Migration files created
|
||||||
|
- [ ] Migration tested (up and down)
|
||||||
|
- [ ] Indexes added where needed
|
||||||
|
- [ ] RLS policies updated (if needed)
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- [ ] No unnecessary dependencies added
|
||||||
|
- [ ] New dependencies approved by team
|
||||||
|
- [ ] Package versions pinned (not using `^` or `~`)
|
||||||
|
- [ ] `go.mod`/`package.json` updated
|
||||||
|
|
||||||
|
### Breaking Changes (if applicable)
|
||||||
|
|
||||||
|
- [ ] Breaking changes documented
|
||||||
|
- [ ] Migration guide provided
|
||||||
|
- [ ] Backward compatibility considered
|
||||||
|
- [ ] Deprecation warnings added
|
||||||
|
|
||||||
|
## 🔗 Additional Context
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Add any other context, design decisions, or trade-offs made.
|
||||||
|
Link to relevant documentation, ADRs, or discussions.
|
||||||
|
-->
|
||||||
|
|
||||||
|
## 🎯 Definition of Done
|
||||||
|
|
||||||
|
<!-- All items must be checked before merging -->
|
||||||
|
|
||||||
|
- [ ] Code review completed and approved
|
||||||
|
- [ ] All CI/CD checks passing
|
||||||
|
- [ ] No merge conflicts
|
||||||
|
- [ ] Branch is up to date with develop
|
||||||
|
- [ ] Documentation is complete
|
||||||
|
- [ ] QA/Testing completed (if required)
|
||||||
|
- [ ] Product owner approved (if user-facing)
|
||||||
|
|
||||||
|
## 🚀 Post-Merge Actions
|
||||||
|
|
||||||
|
<!-- Actions to take after merging -->
|
||||||
|
|
||||||
|
- [ ] Delete feature branch
|
||||||
|
- [ ] Update Jira ticket status
|
||||||
|
- [ ] Notify team in Slack
|
||||||
|
- [ ] Monitor production logs (if deploying)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Reviewer Notes:**
|
||||||
|
<!-- Specific areas where you want reviewer feedback -->
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
||||||
|
**Deployment Notes:**
|
||||||
|
<!-- Special considerations for deployment -->
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
@ -0,0 +1,194 @@
|
||||||
|
# ==============================================================================
|
||||||
|
# OPERATING SYSTEM FILES
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
*~
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# IDE AND EDITORS
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# JetBrains IDEs (IntelliJ, GoLand, WebStorm)
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# Sublime Text
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.swn
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Emacs
|
||||||
|
\#*\#
|
||||||
|
.\#*
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# GO / BACKEND
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Binaries
|
||||||
|
backend/bin/
|
||||||
|
backend/tmp/
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of go coverage tool
|
||||||
|
*.out
|
||||||
|
coverage.txt
|
||||||
|
coverage.html
|
||||||
|
|
||||||
|
# Go workspace file (Go 1.18+)
|
||||||
|
go.work
|
||||||
|
|
||||||
|
# Vendor directory (if not using modules)
|
||||||
|
vendor/
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# NODE.JS / FRONTEND
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Build outputs
|
||||||
|
.svelte-kit/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
.output/
|
||||||
|
|
||||||
|
# Package manager files (lock files are debatable - we'll include them)
|
||||||
|
# npm-debug.log*
|
||||||
|
# yarn-debug.log*
|
||||||
|
# yarn-error.log*
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
coverage/
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Cache
|
||||||
|
.npm
|
||||||
|
.eslintcache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# ENVIRONMENT VARIABLES
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Environment files (contain secrets!)
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# DO commit .env.example (template without secrets)
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# DATABASE
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# SQLite databases (if using for local dev)
|
||||||
|
*.db
|
||||||
|
*.sqlite
|
||||||
|
*.sqlite3
|
||||||
|
|
||||||
|
# PostgreSQL dumps
|
||||||
|
*.sql.gz
|
||||||
|
*.dump
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# LOGS
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
logs/
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# TEMPORARY FILES
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
tmp/
|
||||||
|
temp/
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.cache
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# DOCKER
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Don't ignore docker-compose.yml - we want that in Git
|
||||||
|
# Only ignore override files
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# KUBERNETES
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Secrets (generated, not committed)
|
||||||
|
infrastructure/kubernetes/secrets/
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# CERTIFICATES AND KEYS
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
*.pem
|
||||||
|
*.key
|
||||||
|
*.crt
|
||||||
|
*.cer
|
||||||
|
*.p12
|
||||||
|
*.pfx
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# ARCHIVES
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
*.zip
|
||||||
|
*.tar
|
||||||
|
*.tar.gz
|
||||||
|
*.rar
|
||||||
|
*.7z
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# PROJECT-SPECIFIC
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Uploaded files during development
|
||||||
|
uploads/
|
||||||
|
storage/
|
||||||
|
|
||||||
|
|
||||||
|
# docs/generated/
|
||||||
|
|
@ -0,0 +1,353 @@
|
||||||
|
# Aurganize V6.2
|
||||||
|
|
||||||
|
**Comprehensive Business Operating System for project-based work between vendors and consumers.**
|
||||||
|
|
||||||
|
## 🎯 Project Overview
|
||||||
|
|
||||||
|
Aurganize V6.2 is a multi-tenant SaaS platform that enables seamless project management and collaboration between service vendors and their consumers. Built with modern technologies, it provides:
|
||||||
|
|
||||||
|
- **Dynamic Workflow Engine:** AI-powered conversations for work item management
|
||||||
|
- **Milestone Logic System:** Configurable conditions for milestone achievement
|
||||||
|
- **Payment Management:** Structured proof workflow without payment processing
|
||||||
|
- **Real-time Collaboration:** WebSocket-based live updates
|
||||||
|
- **Enterprise Security:** Row-Level Security (RLS) for data isolation
|
||||||
|
|
||||||
|
## 🏗️ Architecture
|
||||||
|
|
||||||
|
----- TO DO ---------
|
||||||
|
|
||||||
|
## 📋 Prerequisites
|
||||||
|
|
||||||
|
Before you begin, ensure you have the following installed:
|
||||||
|
|
||||||
|
- **Go:** 1.21 or higher ([Download](https://golang.org/dl/))
|
||||||
|
- **Node.js:** 18 or higher ([Download](https://nodejs.org/))
|
||||||
|
- **PostgreSQL:** 14 or higher ([Download](https://www.postgresql.org/download/))
|
||||||
|
- **Docker:** Latest version ([Download](https://www.docker.com/get-started))
|
||||||
|
- **Docker Compose:** Included with Docker Desktop
|
||||||
|
- **Git:** Latest version ([Download](https://git-scm.com/downloads))
|
||||||
|
|
||||||
|
**Verify installations:**
|
||||||
|
```bash
|
||||||
|
go version # Should show: go version go1.21.x
|
||||||
|
node --version # Should show: v18.x.x or higher
|
||||||
|
npm --version # Should show: 9.x.x or higher
|
||||||
|
docker --version # Should show: Docker version 24.x.x
|
||||||
|
psql --version # Should show: psql (PostgreSQL) 14.x
|
||||||
|
git --version # Should show: git version 2.x.x
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🚀 Quick Start
|
||||||
|
|
||||||
|
### Option 1: Docker (Recommended)
|
||||||
|
|
||||||
|
**Fastest way to get started - everything runs in containers:**
|
||||||
|
```bash
|
||||||
|
# 1. Clone the repository
|
||||||
|
git clone https://github.com/yourorg/aurganize-v62.git
|
||||||
|
cd aurganize-v62
|
||||||
|
|
||||||
|
# 2. Start all services
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
# 3. Run database migrations
|
||||||
|
docker-compose exec backend make migrate-up
|
||||||
|
|
||||||
|
# 4. Access the application
|
||||||
|
# Frontend: http://localhost:5173
|
||||||
|
# Backend: http://localhost:8080
|
||||||
|
# API Docs: http://localhost:8080/api/v1/docs
|
||||||
|
```
|
||||||
|
|
||||||
|
**To stop services:**
|
||||||
|
```bash
|
||||||
|
docker-compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
**To see logs:**
|
||||||
|
```bash
|
||||||
|
docker-compose logs -f backend # Backend logs
|
||||||
|
docker-compose logs -f frontend # Frontend logs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option 2: Local Development
|
||||||
|
|
||||||
|
**Run services natively (for development):**
|
||||||
|
|
||||||
|
#### Step 1: Setup Backend
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
|
||||||
|
# Copy environment template
|
||||||
|
cp .env.example .env
|
||||||
|
|
||||||
|
# Edit .env with your database credentials
|
||||||
|
# nano .env
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
# Run database migrations
|
||||||
|
make migrate-up
|
||||||
|
|
||||||
|
# Start development server (with hot reload)
|
||||||
|
make dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Backend should now be running at `http://localhost:8080`
|
||||||
|
|
||||||
|
#### Step 2: Setup Frontend
|
||||||
|
|
||||||
|
**Open a new terminal:**
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Start development server
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Frontend should now be running at `http://localhost:5173`
|
||||||
|
|
||||||
|
#### Step 3: Verify Everything Works
|
||||||
|
```bash
|
||||||
|
# Test backend health check
|
||||||
|
curl http://localhost:8080/health
|
||||||
|
|
||||||
|
# Expected response:
|
||||||
|
# {
|
||||||
|
# "status": "healthy",
|
||||||
|
# "version": "6.2.0",
|
||||||
|
# "timestamp": "2025-11-26T10:00:00Z"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Open frontend in browser
|
||||||
|
# Visit: http://localhost:5173
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📁 Project Structure
|
||||||
|
|
||||||
|
----- TO DO ---------
|
||||||
|
|
||||||
|
|
||||||
|
## 🛠️ Development Workflow
|
||||||
|
|
||||||
|
### Creating a New Feature
|
||||||
|
```bash
|
||||||
|
# 1. Ensure you're on develop branch
|
||||||
|
git checkout develop
|
||||||
|
git pull origin develop
|
||||||
|
|
||||||
|
# 2. Create feature branch
|
||||||
|
git checkout -b feature/your-feature-name
|
||||||
|
|
||||||
|
# 3. Make your changes
|
||||||
|
# ... code, code, code ...
|
||||||
|
|
||||||
|
# 4. Run tests
|
||||||
|
cd backend && make test
|
||||||
|
cd frontend && npm test
|
||||||
|
|
||||||
|
# 5. Commit with conventional commit message
|
||||||
|
git add .
|
||||||
|
git commit -m "feat: add user authentication system"
|
||||||
|
|
||||||
|
# 6. Push to remote
|
||||||
|
git push origin feature/your-feature-name
|
||||||
|
|
||||||
|
# 7. Create Pull Request on GitHub
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running Tests
|
||||||
|
|
||||||
|
**Backend tests:**
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
make test # Run all tests
|
||||||
|
make test-coverage # With coverage report
|
||||||
|
go test ./internal/services # Test specific package
|
||||||
|
```
|
||||||
|
|
||||||
|
**Frontend tests:**
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm test # Run all tests
|
||||||
|
npm run test:unit # Unit tests only
|
||||||
|
npm run test:e2e # E2E tests
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Migrations
|
||||||
|
|
||||||
|
**Create new migration:**
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
make migration-create NAME=add_users_table
|
||||||
|
|
||||||
|
# Creates:
|
||||||
|
# migrations/000002_add_users_table.up.sql
|
||||||
|
# migrations/000002_add_users_table.down.sql
|
||||||
|
```
|
||||||
|
|
||||||
|
**Apply migrations:**
|
||||||
|
```bash
|
||||||
|
make migrate-up # Apply all pending migrations
|
||||||
|
make migrate-down # Rollback last migration
|
||||||
|
make migrate-reset # Rollback all, then apply all
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Common Commands
|
||||||
|
|
||||||
|
### Backend (Makefile commands)
|
||||||
|
```bash
|
||||||
|
make dev # Start development server
|
||||||
|
make build # Build production binary
|
||||||
|
make test # Run tests
|
||||||
|
make lint # Run linter
|
||||||
|
make fmt # Format code
|
||||||
|
make clean # Clean build artifacts
|
||||||
|
make migrate-up # Run migrations
|
||||||
|
make migrate-down # Rollback migrations
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend (npm scripts)
|
||||||
|
```bash
|
||||||
|
npm run dev # Start dev server
|
||||||
|
npm run build # Build for production
|
||||||
|
npm run preview # Preview production build
|
||||||
|
npm test # Run tests
|
||||||
|
npm run lint # Run ESLint
|
||||||
|
npm run format # Run Prettier
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker Commands
|
||||||
|
```bash
|
||||||
|
docker-compose up # Start all services
|
||||||
|
docker-compose up -d # Start in background
|
||||||
|
docker-compose down # Stop all services
|
||||||
|
docker-compose ps # List running services
|
||||||
|
docker-compose logs -f # View logs (follow)
|
||||||
|
docker-compose exec backend sh # Shell into backend container
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📚 Documentation
|
||||||
|
|
||||||
|
- [System Architecture](docs/architecture/overview.md)
|
||||||
|
- [API Reference](docs/api/reference.md)
|
||||||
|
- [Database Schema](docs/architecture/database-schema.md)
|
||||||
|
- [Development Guide](docs/setup/development.md)
|
||||||
|
- [Deployment Guide](docs/deployment/production.md)
|
||||||
|
- [Architecture Decisions](docs/adr/)
|
||||||
|
|
||||||
|
## 🛡️ Security
|
||||||
|
|
||||||
|
- **Data Isolation:** PostgreSQL Row-Level Security (RLS)
|
||||||
|
- **Authentication:** JWT-based with refresh tokens
|
||||||
|
- **Password Hashing:** bcrypt with cost factor 12
|
||||||
|
- **HTTPS Only:** TLS 1.3 in production
|
||||||
|
- **Rate Limiting:** Per-IP and per-user limits
|
||||||
|
- **Input Validation:** Server-side validation on all inputs
|
||||||
|
- **SQL Injection Protection:** Parameterized queries only
|
||||||
|
|
||||||
|
## 🧪 Testing
|
||||||
|
|
||||||
|
### Test Coverage Goals
|
||||||
|
|
||||||
|
- Backend: > 80% code coverage
|
||||||
|
- Frontend: > 70% code coverage
|
||||||
|
- Critical paths: 100% coverage
|
||||||
|
|
||||||
|
### Test Types
|
||||||
|
|
||||||
|
1. **Unit Tests:** Test individual functions
|
||||||
|
2. **Integration Tests:** Test component interactions
|
||||||
|
3. **E2E Tests:** Test complete user flows
|
||||||
|
4. **Performance Tests:** Load testing with k6
|
||||||
|
|
||||||
|
## 🚢 Deployment
|
||||||
|
|
||||||
|
### Development
|
||||||
|
```bash
|
||||||
|
# Local development with hot reload
|
||||||
|
make dev (backend)
|
||||||
|
npm run dev (frontend)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Staging
|
||||||
|
```bash
|
||||||
|
# Deploy to staging environment
|
||||||
|
./scripts/deploy-staging.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Production
|
||||||
|
```bash
|
||||||
|
# Deploy to production (requires approvals)
|
||||||
|
./scripts/deploy-production.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🐛 Troubleshooting
|
||||||
|
|
||||||
|
### Backend won't start
|
||||||
|
|
||||||
|
**Error: "database connection failed"**
|
||||||
|
```bash
|
||||||
|
# Check PostgreSQL is running
|
||||||
|
docker ps | grep postgres
|
||||||
|
|
||||||
|
# Check connection string in .env
|
||||||
|
cat backend/.env | grep DB_
|
||||||
|
|
||||||
|
# Test connection manually
|
||||||
|
psql -h localhost -U aurganize -d aurganize_v62
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend build fails
|
||||||
|
|
||||||
|
**Error: "node_modules not found"**
|
||||||
|
```bash
|
||||||
|
# Delete and reinstall dependencies
|
||||||
|
rm -rf frontend/node_modules
|
||||||
|
cd frontend && npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Port already in use
|
||||||
|
|
||||||
|
**Error: "address already in use"**
|
||||||
|
```bash
|
||||||
|
# Find process using port 8080
|
||||||
|
lsof -i :8080
|
||||||
|
|
||||||
|
# Kill the process
|
||||||
|
kill -9 <PID>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 👥 Team
|
||||||
|
|
||||||
|
- **Developer 1:** Backend (Go/PostgreSQL/API)
|
||||||
|
- **Developer 2:** Frontend (Svelte/TypeScript/UI)
|
||||||
|
|
||||||
|
## 📝 License
|
||||||
|
|
||||||
|
Proprietary - All Rights Reserved
|
||||||
|
|
||||||
|
## 🤝 Contributing
|
||||||
|
|
||||||
|
1. Fork the repository
|
||||||
|
2. Create feature branch (`feature/amazing-feature`)
|
||||||
|
3. Commit changes (`feat: add amazing feature`)
|
||||||
|
4. Push to branch
|
||||||
|
5. Create Pull Request
|
||||||
|
|
||||||
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
||||||
|
|
||||||
|
## 📞 Support
|
||||||
|
|
||||||
|
- **Documentation:** See `/docs` directory
|
||||||
|
- **Issues:** Create GitHub issue
|
||||||
|
- **Questions:** Ask in team Slack channel
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Made with ❤️ by the Aurganize Team**
|
||||||
|
EOF
|
||||||
Loading…
Reference in New Issue