mem8 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mem8-1.2.0/.github/workflows/release.yml +63 -0
- mem8-1.2.0/.gitignore +25 -0
- mem8-1.2.0/.python-version +1 -0
- mem8-1.2.0/.releaserc.json +21 -0
- mem8-1.2.0/CLAUDE.md +1 -0
- mem8-1.2.0/DOCKER.md +150 -0
- mem8-1.2.0/LICENSE +201 -0
- mem8-1.2.0/PKG-INFO +327 -0
- mem8-1.2.0/QUICKSTART.md +129 -0
- mem8-1.2.0/README.md +282 -0
- mem8-1.2.0/ROADMAP.md +212 -0
- mem8-1.2.0/ai_mem/__init__.py +1 -0
- mem8-1.2.0/ai_mem/claude_integration.py +109 -0
- mem8-1.2.0/ai_mem/cli.py +743 -0
- mem8-1.2.0/ai_mem/core/__init__.py +1 -0
- mem8-1.2.0/ai_mem/core/config.py +155 -0
- mem8-1.2.0/ai_mem/core/memory.py +597 -0
- mem8-1.2.0/ai_mem/core/smart_setup.py +318 -0
- mem8-1.2.0/ai_mem/core/sync.py +359 -0
- mem8-1.2.0/ai_mem/core/utils.py +255 -0
- mem8-1.2.0/backend/.env.example +38 -0
- mem8-1.2.0/backend/Dockerfile +42 -0
- mem8-1.2.0/backend/README.md +3 -0
- mem8-1.2.0/backend/init.sql +16 -0
- mem8-1.2.0/backend/init_db.py +35 -0
- mem8-1.2.0/backend/pyproject.toml +56 -0
- mem8-1.2.0/backend/src/aimem_api/__init__.py +3 -0
- mem8-1.2.0/backend/src/aimem_api/config.py +92 -0
- mem8-1.2.0/backend/src/aimem_api/database.py +77 -0
- mem8-1.2.0/backend/src/aimem_api/database_types.py +17 -0
- mem8-1.2.0/backend/src/aimem_api/main.py +109 -0
- mem8-1.2.0/backend/src/aimem_api/models/__init__.py +15 -0
- mem8-1.2.0/backend/src/aimem_api/models/base.py +49 -0
- mem8-1.2.0/backend/src/aimem_api/models/team.py +73 -0
- mem8-1.2.0/backend/src/aimem_api/models/thought.py +70 -0
- mem8-1.2.0/backend/src/aimem_api/models/user.py +32 -0
- mem8-1.2.0/backend/src/aimem_api/routers/__init__.py +9 -0
- mem8-1.2.0/backend/src/aimem_api/routers/auth.py +231 -0
- mem8-1.2.0/backend/src/aimem_api/routers/health.py +77 -0
- mem8-1.2.0/backend/src/aimem_api/routers/public.py +43 -0
- mem8-1.2.0/backend/src/aimem_api/routers/search.py +231 -0
- mem8-1.2.0/backend/src/aimem_api/routers/sync.py +215 -0
- mem8-1.2.0/backend/src/aimem_api/routers/teams.py +351 -0
- mem8-1.2.0/backend/src/aimem_api/routers/thoughts.py +284 -0
- mem8-1.2.0/backend/src/aimem_api/schemas/__init__.py +53 -0
- mem8-1.2.0/backend/src/aimem_api/schemas/search.py +54 -0
- mem8-1.2.0/backend/src/aimem_api/schemas/team.py +64 -0
- mem8-1.2.0/backend/src/aimem_api/schemas/thought.py +63 -0
- mem8-1.2.0/backend/src/aimem_api/schemas/user.py +44 -0
- mem8-1.2.0/backend/src/aimem_api/services/filesystem_thoughts.py +183 -0
- mem8-1.2.0/backend/src/aimem_api/services/search.py +181 -0
- mem8-1.2.0/backend/uv.lock +2210 -0
- mem8-1.2.0/claude-dot-md-template/README.md +69 -0
- mem8-1.2.0/claude-dot-md-template/cookiecutter.json +14 -0
- mem8-1.2.0/claude-dot-md-template/hooks/post_gen_project.py +55 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/CLAUDE.md +3 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/codebase-analyzer.md +120 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/codebase-locator.md +93 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/codebase-pattern-finder.md +206 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/thoughts-analyzer.md +144 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/thoughts-locator.md +126 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/agents/web-search-researcher.md +108 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/browse-memories.md +24 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/commit.md +40 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/create_plan.md +83 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/create_worktree.md +37 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/debug.md +196 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/describe_pr.md +71 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/founder_mode.md +15 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/implement_plan.md +65 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/linear.md +384 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/local_review.md +44 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/ralph_impl.md +28 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/ralph_plan.md +30 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/ralph_research.md +46 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/research_codebase.md +186 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/setup-memory.md +27 -0
- mem8-1.2.0/claude-dot-md-template/{{cookiecutter.project_slug}}/commands/validate_plan.md +162 -0
- mem8-1.2.0/docker-compose.dev.yml +50 -0
- mem8-1.2.0/docker-compose.yml +107 -0
- mem8-1.2.0/example-configs/README.md +99 -0
- mem8-1.2.0/example-configs/claude-dot-md/cookiecutter-config-full.yaml +12 -0
- mem8-1.2.0/example-configs/claude-dot-md/cookiecutter-config-minimal.yaml +12 -0
- mem8-1.2.0/example-configs/claude-dot-md/default.yaml +12 -0
- mem8-1.2.0/example-configs/claude-dot-md/enterprise-full.yaml +12 -0
- mem8-1.2.0/example-configs/claude-dot-md/minimal.yaml +12 -0
- mem8-1.2.0/example-configs/shared-thoughts/default.yaml +13 -0
- mem8-1.2.0/example-configs/shared-thoughts/personal-notes.yaml +13 -0
- mem8-1.2.0/example-configs/shared-thoughts/team-collaboration.yaml +13 -0
- mem8-1.2.0/example-configs/shared-thoughts/thoughts-config-default.yaml +13 -0
- mem8-1.2.0/frontend/.gitignore +41 -0
- mem8-1.2.0/frontend/Dockerfile +62 -0
- mem8-1.2.0/frontend/README.md +36 -0
- mem8-1.2.0/frontend/app/auth/callback/page.tsx +129 -0
- mem8-1.2.0/frontend/app/favicon.ico +0 -0
- mem8-1.2.0/frontend/app/globals.css +232 -0
- mem8-1.2.0/frontend/app/layout.tsx +41 -0
- mem8-1.2.0/frontend/app/page.tsx +531 -0
- mem8-1.2.0/frontend/components/AuthGuard.tsx +67 -0
- mem8-1.2.0/frontend/components/GitHubAuth.tsx +146 -0
- mem8-1.2.0/frontend/components/UserDropdown.tsx +115 -0
- mem8-1.2.0/frontend/components/ui/badge.tsx +40 -0
- mem8-1.2.0/frontend/components/ui/button.tsx +57 -0
- mem8-1.2.0/frontend/eslint.config.mjs +25 -0
- mem8-1.2.0/frontend/hooks/useApi.ts +146 -0
- mem8-1.2.0/frontend/hooks/useAuth.ts +135 -0
- mem8-1.2.0/frontend/hooks/useWebSocket.ts +177 -0
- mem8-1.2.0/frontend/lib/api.ts +299 -0
- mem8-1.2.0/frontend/lib/auth.ts +165 -0
- mem8-1.2.0/frontend/lib/providers.tsx +42 -0
- mem8-1.2.0/frontend/lib/utils.ts +6 -0
- mem8-1.2.0/frontend/next.config.ts +7 -0
- mem8-1.2.0/frontend/package-lock.json +7097 -0
- mem8-1.2.0/frontend/package.json +40 -0
- mem8-1.2.0/frontend/postcss.config.js +6 -0
- mem8-1.2.0/frontend/postcss.config.mjs +5 -0
- mem8-1.2.0/frontend/public/apple-touch-icon.png +0 -0
- mem8-1.2.0/frontend/public/favicon-128x128.png +0 -0
- mem8-1.2.0/frontend/public/favicon-16x16.png +0 -0
- mem8-1.2.0/frontend/public/favicon-192x192.png +0 -0
- mem8-1.2.0/frontend/public/favicon-32x32.png +0 -0
- mem8-1.2.0/frontend/public/favicon-48x48.png +0 -0
- mem8-1.2.0/frontend/public/favicon-512x512.png +0 -0
- mem8-1.2.0/frontend/public/favicon-64x64.png +0 -0
- mem8-1.2.0/frontend/public/favicon.ico +0 -0
- mem8-1.2.0/frontend/public/file.svg +1 -0
- mem8-1.2.0/frontend/public/globe.svg +1 -0
- mem8-1.2.0/frontend/public/logo_mark.png +0 -0
- mem8-1.2.0/frontend/public/logo_transparent_with_words.png +0 -0
- mem8-1.2.0/frontend/public/next.svg +1 -0
- mem8-1.2.0/frontend/public/vercel.svg +1 -0
- mem8-1.2.0/frontend/public/window.svg +1 -0
- mem8-1.2.0/frontend/tailwind.config.ts +98 -0
- mem8-1.2.0/frontend/tsconfig.json +27 -0
- mem8-1.2.0/load_thoughts.py +97 -0
- mem8-1.2.0/pyproject.toml +95 -0
- mem8-1.2.0/scripts/deploy.sh +50 -0
- mem8-1.2.0/scripts/dev-setup.sh +52 -0
- mem8-1.2.0/shared-thoughts-template/README.md +129 -0
- mem8-1.2.0/shared-thoughts-template/cookiecutter.json +15 -0
- mem8-1.2.0/shared-thoughts-template/hooks/post_gen_project.py +156 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/.gitignore +35 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/README.md +96 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/sync-thoughts.bat +49 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/sync-thoughts.ps1 +62 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/sync-thoughts.sh +50 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/searchable/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/decisions/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/plans/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/pr_description.md +49 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/prs/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/prs/pr_description.md +49 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/research/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/shared/tickets/.gitkeep +4 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/{{cookiecutter.username}}/notes/.gitkeep +3 -0
- mem8-1.2.0/shared-thoughts-template/{{cookiecutter.project_slug}}/thoughts/{{cookiecutter.username}}/tickets/.gitkeep +3 -0
- mem8-1.2.0/tests/conftest.py +26 -0
- mem8-1.2.0/tests/test_ai_mem_cli.py +312 -0
- mem8-1.2.0/tests/test_init_data_preservation.py +331 -0
- mem8-1.2.0/thoughts/README.md +19 -0
- mem8-1.2.0/thoughts/shared/plans/ai-mem-orchestr8-implementation.md +1335 -0
- mem8-1.2.0/thoughts/shared/plans/claude-code-integration-easy-onboarding.md +703 -0
- mem8-1.2.0/thoughts/shared/prs/1_description.md +161 -0
- mem8-1.2.0/thoughts/shared/prs/phase1_implementation_description.md +92 -0
- mem8-1.2.0/thoughts/shared/research/2025-08-30_09-27-55_cli-polish-implementation.md +212 -0
- mem8-1.2.0/thoughts/shared/research/2025-08-30_12-05-35_thoughts-system-multi-repo-integration.md +193 -0
- mem8-1.2.0/thoughts/shared/research/2025-08-30_13-52-45_pypi-release-workflow-failure-analysis.md +143 -0
- mem8-1.2.0/uv.lock +1815 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Semantic Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
concurrency: release
|
|
18
|
+
environment:
|
|
19
|
+
name: pypi
|
|
20
|
+
url: https://pypi.org/project/ai-mem/
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
token: ${{ secrets.GITHUB_TOKEN }} # pragma: allowlist secret
|
|
27
|
+
|
|
28
|
+
- name: Install uv
|
|
29
|
+
uses: astral-sh/setup-uv@v4
|
|
30
|
+
|
|
31
|
+
- name: Setup Node.js
|
|
32
|
+
uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: '20'
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
npm install -g semantic-release @semantic-release/git @semantic-release/exec @semantic-release/github
|
|
39
|
+
|
|
40
|
+
- name: Release
|
|
41
|
+
env:
|
|
42
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
run: |
|
|
45
|
+
# Configure git
|
|
46
|
+
git config user.name "github-actions[bot]"
|
|
47
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
48
|
+
|
|
49
|
+
# Run semantic-release
|
|
50
|
+
npx semantic-release
|
|
51
|
+
|
|
52
|
+
- name: Publish to PyPI
|
|
53
|
+
if: success()
|
|
54
|
+
env:
|
|
55
|
+
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
56
|
+
run: |
|
|
57
|
+
# Check if dist directory exists (created by semantic-release)
|
|
58
|
+
if [ -d "dist" ]; then
|
|
59
|
+
echo "Publishing to PyPI..."
|
|
60
|
+
uv publish --token $PYPI_TOKEN
|
|
61
|
+
else
|
|
62
|
+
echo "No dist directory found, skipping PyPI publish"
|
|
63
|
+
fi
|
mem8-1.2.0/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Output directory for generated templates
|
|
13
|
+
out/
|
|
14
|
+
out-*/
|
|
15
|
+
test-*/
|
|
16
|
+
*-files.txt
|
|
17
|
+
|
|
18
|
+
.claude
|
|
19
|
+
|
|
20
|
+
*.db
|
|
21
|
+
|
|
22
|
+
.env
|
|
23
|
+
.env.*local*
|
|
24
|
+
.env.*.local*
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
[
|
|
7
|
+
"@semantic-release/exec",
|
|
8
|
+
{
|
|
9
|
+
"prepareCmd": "sed -i 's/version = \".*\"/version = \"${nextRelease.version}\"/' pyproject.toml && echo '__version__ = \"${nextRelease.version}\"' > ai_mem/__init__.py && uv build"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"@semantic-release/git",
|
|
14
|
+
{
|
|
15
|
+
"assets": ["pyproject.toml", "ai_mem/__init__.py"],
|
|
16
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"@semantic-release/github"
|
|
20
|
+
]
|
|
21
|
+
}
|
mem8-1.2.0/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Use conventional commits as this project uses github actions that auto-pubish .github\workflows\release.yml
|
mem8-1.2.0/DOCKER.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# AI-Mem Docker Setup
|
|
2
|
+
|
|
3
|
+
This document describes how to run AI-Mem using Docker for local development and production deployment.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Development Setup (Recommended)
|
|
8
|
+
|
|
9
|
+
For local development with hot reload and easier debugging:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Start database services only
|
|
13
|
+
./scripts/dev-setup.sh
|
|
14
|
+
|
|
15
|
+
# Then run backend and frontend locally
|
|
16
|
+
cd backend && uv run python -m uvicorn aimem_api.main:app --reload --host 127.0.0.1 --port 8000
|
|
17
|
+
cd frontend && npm run dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Full Stack Deployment
|
|
21
|
+
|
|
22
|
+
For production-like deployment with all services in containers:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
./scripts/deploy.sh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Architecture
|
|
29
|
+
|
|
30
|
+
### Services
|
|
31
|
+
|
|
32
|
+
- **PostgreSQL**: Primary database (production-ready)
|
|
33
|
+
- **Redis**: Cache and session storage
|
|
34
|
+
- **Backend**: FastAPI application with automatic database migration
|
|
35
|
+
- **Frontend**: Next.js application with optimized production build
|
|
36
|
+
|
|
37
|
+
### Networking
|
|
38
|
+
|
|
39
|
+
All services run on a dedicated Docker network (`aimem-network`) for secure inter-service communication.
|
|
40
|
+
|
|
41
|
+
### Volumes
|
|
42
|
+
|
|
43
|
+
- `postgres_data`: Persistent PostgreSQL data
|
|
44
|
+
- `redis_data`: Persistent Redis data
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
### Environment Variables
|
|
49
|
+
|
|
50
|
+
The backend uses these key environment variables:
|
|
51
|
+
|
|
52
|
+
```env
|
|
53
|
+
DATABASE_URL=postgresql+asyncpg://user:password@host:port/database
|
|
54
|
+
REDIS_URL=redis://host:port
|
|
55
|
+
SECRET_KEY=your-secret-key-minimum-32-characters
|
|
56
|
+
DEBUG=false
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Development vs Production
|
|
60
|
+
|
|
61
|
+
| Environment | Database | Redis | Frontend | Backend |
|
|
62
|
+
|-------------|----------|-------|----------|---------|
|
|
63
|
+
| Development | postgres-dev:5433 | redis-dev:6380 | Local (npm) | Local (uv) |
|
|
64
|
+
| Production | postgres:5432 | redis:6379 | Container | Container |
|
|
65
|
+
|
|
66
|
+
## Commands
|
|
67
|
+
|
|
68
|
+
### Development
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Start infrastructure only
|
|
72
|
+
docker-compose -f docker-compose.dev.yml up -d
|
|
73
|
+
|
|
74
|
+
# View logs
|
|
75
|
+
docker-compose -f docker-compose.dev.yml logs -f
|
|
76
|
+
|
|
77
|
+
# Stop infrastructure
|
|
78
|
+
docker-compose -f docker-compose.dev.yml down
|
|
79
|
+
|
|
80
|
+
# Clean up volumes
|
|
81
|
+
docker-compose -f docker-compose.dev.yml down -v
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Production
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Start all services
|
|
88
|
+
docker-compose up -d
|
|
89
|
+
|
|
90
|
+
# Build and start (rebuild images)
|
|
91
|
+
docker-compose up --build -d
|
|
92
|
+
|
|
93
|
+
# View logs
|
|
94
|
+
docker-compose logs -f [service_name]
|
|
95
|
+
|
|
96
|
+
# Stop all services
|
|
97
|
+
docker-compose down
|
|
98
|
+
|
|
99
|
+
# Clean up everything including data
|
|
100
|
+
docker-compose down -v
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Health Checks
|
|
104
|
+
|
|
105
|
+
All services include health checks:
|
|
106
|
+
|
|
107
|
+
- **PostgreSQL**: `pg_isready` command
|
|
108
|
+
- **Redis**: `redis-cli ping` command
|
|
109
|
+
- **Backend**: HTTP GET to `/api/v1/health`
|
|
110
|
+
- **Frontend**: HTTP GET to root path
|
|
111
|
+
|
|
112
|
+
## Troubleshooting
|
|
113
|
+
|
|
114
|
+
### Database Connection Issues
|
|
115
|
+
|
|
116
|
+
1. Ensure PostgreSQL is running: `docker-compose ps postgres`
|
|
117
|
+
2. Check logs: `docker-compose logs postgres`
|
|
118
|
+
3. Test connection: `docker-compose exec postgres psql -U aimem_user -d aimem`
|
|
119
|
+
|
|
120
|
+
### Backend Startup Issues
|
|
121
|
+
|
|
122
|
+
1. Check database connectivity
|
|
123
|
+
2. Verify environment variables: `docker-compose exec backend env | grep DATABASE_URL`
|
|
124
|
+
3. View backend logs: `docker-compose logs backend`
|
|
125
|
+
|
|
126
|
+
### Port Conflicts
|
|
127
|
+
|
|
128
|
+
If you get port binding errors:
|
|
129
|
+
|
|
130
|
+
- Development: Uses ports 5433 (PostgreSQL), 6380 (Redis)
|
|
131
|
+
- Production: Uses ports 5432 (PostgreSQL), 6379 (Redis), 8000 (Backend), 3000 (Frontend)
|
|
132
|
+
|
|
133
|
+
Stop conflicting services or change ports in docker-compose files.
|
|
134
|
+
|
|
135
|
+
## Orchestr8 Integration
|
|
136
|
+
|
|
137
|
+
This Docker setup is designed to be cloud-native and compatible with Orchestr8 deployment:
|
|
138
|
+
|
|
139
|
+
- All configuration via environment variables
|
|
140
|
+
- Health checks for Kubernetes liveness/readiness probes
|
|
141
|
+
- Multi-stage Dockerfiles for optimized production images
|
|
142
|
+
- Proper volume mounts for persistent data
|
|
143
|
+
- Network isolation for security
|
|
144
|
+
|
|
145
|
+
To deploy with Orchestr8:
|
|
146
|
+
|
|
147
|
+
1. Push images to your container registry
|
|
148
|
+
2. Update `docker-compose.yml` with your image tags
|
|
149
|
+
3. Configure environment variables for your cloud environment
|
|
150
|
+
4. Use Orchestr8 to deploy the compose file to Kubernetes
|
mem8-1.2.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity granting the License.
|
|
13
|
+
|
|
14
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
15
|
+
other entities that control, are controlled by, or are under common
|
|
16
|
+
control with that entity. For the purposes of this definition,
|
|
17
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
18
|
+
direction or management of such entity, whether by contract or
|
|
19
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
23
|
+
exercising permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
26
|
+
including but not limited to software source code, documentation
|
|
27
|
+
source, and configuration files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical
|
|
30
|
+
transformation or translation of a Source form, including but
|
|
31
|
+
not limited to compiled object code, generated documentation,
|
|
32
|
+
and conversions to other media types.
|
|
33
|
+
|
|
34
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
35
|
+
Object form, made available under the License, as indicated by a
|
|
36
|
+
copyright notice that is included in or attached to the work
|
|
37
|
+
(which shall not include communications that are clearly marked or
|
|
38
|
+
otherwise designated in writing by the copyright owner as "Not a Work").
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based upon (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and derivative works thereof.
|
|
47
|
+
|
|
48
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
49
|
+
on behalf of whom a Contribution has been submitted to Licensor.
|
|
50
|
+
For the purposes of this definition, "Contribution" shall mean any
|
|
51
|
+
work of authorship, including the original version of the Work and any
|
|
52
|
+
modifications or additions to that Work or Derivative Works thereof,
|
|
53
|
+
that is intentionally submitted to Licensor for inclusion in the Work
|
|
54
|
+
by the copyright owner or by an individual or Legal Entity authorized
|
|
55
|
+
to submit on behalf of the copyright owner. For the purposes of this
|
|
56
|
+
definition, "submitted" means any form of electronic, verbal, or
|
|
57
|
+
written communication sent to the Licensor or its representatives,
|
|
58
|
+
including but not limited to communication on electronic mailing
|
|
59
|
+
lists, source code control systems, and issue tracking systems that
|
|
60
|
+
are managed by, or on behalf of, the Licensor for the purpose of
|
|
61
|
+
discussing and improving the Work, but excluding communication that
|
|
62
|
+
is conspicuously marked or otherwise designated in writing by the
|
|
63
|
+
copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor License Agreement" shall mean the agreement pursuant
|
|
66
|
+
to which a Contributor grants the Licensor certain rights as defined
|
|
67
|
+
below.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to use, reproduce, modify, display, perform,
|
|
73
|
+
sublicense, and distribute the Work and such Derivative Works in
|
|
74
|
+
Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, trademark, patent, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright notice and license terms to Your use,
|
|
127
|
+
reproduction, and distribution of the Work or Derivative Works
|
|
128
|
+
thereof, provided that the terms of such license are not inconsistent
|
|
129
|
+
with the License and that You add a statement identifying such license
|
|
130
|
+
as a separate license from this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Support. You may choose to offer, and to
|
|
168
|
+
charge a fee for, warranty, support, indemnity or other liability
|
|
169
|
+
obligations and/or rights consistent with this License. However, in
|
|
170
|
+
accepting such obligations, You may act only on Your own behalf and on
|
|
171
|
+
Your sole responsibility, not on behalf of any other Contributor, and
|
|
172
|
+
only if You agree to indemnify, defend, and hold each Contributor
|
|
173
|
+
harmless for any liability incurred by, or claims asserted against,
|
|
174
|
+
such Contributor by reason of your accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same page as the copyright notice for easier identification within
|
|
187
|
+
third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 AI-Mem Contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|