Skip to content

Commit 80fa44e

Browse files
committed
inital support for collabrative docs platform
0 parents  commit 80fa44e

File tree

176 files changed

+34637
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+34637
-0
lines changed

.dockerignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Dependencies
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Next.js
8+
.next
9+
out
10+
dist
11+
12+
# Environment files
13+
.env
14+
.env.local
15+
.env.production.local
16+
.env.development.local
17+
.env.test.local
18+
19+
# IDE
20+
.vscode
21+
.idea
22+
*.swp
23+
*.swo
24+
*~
25+
.DS_Store
26+
27+
# Testing
28+
coverage
29+
.nyc_output
30+
31+
# Git
32+
.git
33+
.gitignore
34+
35+
# Documentation
36+
README.md
37+
CLAUDE.md
38+
AUTH_SETUP.md
39+
FEATURES.md
40+
docs
41+
42+
# Docker
43+
Dockerfile
44+
docker-compose*.yml
45+
.dockerignore
46+
47+
# CI/CD
48+
.github
49+
.gitlab-ci.yml
50+
.circleci
51+
52+
# Development
53+
.eslintrc.json
54+
.prettierrc
55+
jest.config.js
56+
cypress
57+
cypress.json
58+
59+
# Logs
60+
logs
61+
*.log
62+
63+
# OS files
64+
Thumbs.db
65+
66+
# Temporary files
67+
tmp
68+
temp
69+
.tmp

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Database
2+
DATABASE_URL="postgresql://postgres:password@localhost:5432/snapdocs"
3+
MONGODB_URI="mongodb://localhost:27017/snapdocs"
4+
5+
# Redis
6+
REDIS_URL="redis://localhost:6379"
7+
8+
# NextAuth
9+
NEXTAUTH_URL="http://localhost:3000"
10+
NEXTAUTH_SECRET="your-secret-key-change-this-in-production"
11+
12+
# File Storage (MinIO or S3)
13+
S3_ENDPOINT="http://localhost:9000"
14+
S3_ACCESS_KEY="minioadmin"
15+
S3_SECRET_KEY="minioadmin"
16+
S3_BUCKET="snapdocs"
17+
S3_REGION="us-east-1"
18+
19+
# Socket.io for real-time
20+
NEXT_PUBLIC_SOCKET_URL="http://localhost:3000"
21+
22+
# App Configuration
23+
NEXT_PUBLIC_APP_URL="http://localhost:3000"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Docker Build and Push to Docker Hub
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
tags:
9+
- 'v*.*.*'
10+
pull_request:
11+
branches:
12+
- main
13+
- master
14+
workflow_dispatch:
15+
inputs:
16+
tag:
17+
description: 'Docker image tag'
18+
required: false
19+
default: 'latest'
20+
21+
env:
22+
DOCKERHUB_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/snapdocs
23+
24+
jobs:
25+
build-and-push:
26+
name: Build and Push Docker Image
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v3
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Log in to Docker Hub
40+
if: github.event_name != 'pull_request'
41+
uses: docker/login-action@v3
42+
with:
43+
username: ${{ secrets.DOCKERHUB_USERNAME }}
44+
password: ${{ secrets.DOCKERHUB_TOKEN }}
45+
46+
- name: Extract metadata
47+
id: meta
48+
uses: docker/metadata-action@v5
49+
with:
50+
images: ${{ env.DOCKERHUB_IMAGE }}
51+
tags: |
52+
type=ref,event=branch
53+
type=ref,event=pr
54+
type=semver,pattern={{version}}
55+
type=semver,pattern={{major}}.{{minor}}
56+
type=semver,pattern={{major}}
57+
type=raw,value=latest,enable={{is_default_branch}}
58+
type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
59+
60+
- name: Build and push Docker image
61+
uses: docker/build-push-action@v5
62+
with:
63+
context: .
64+
platforms: linux/amd64,linux/arm64
65+
push: ${{ github.event_name != 'pull_request' }}
66+
tags: ${{ steps.meta.outputs.tags }}
67+
labels: ${{ steps.meta.outputs.labels }}
68+
cache-from: type=gha
69+
cache-to: type=gha,mode=max
70+
71+
- name: Update Docker Hub Description
72+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
73+
uses: peter-evans/dockerhub-description@v4
74+
with:
75+
username: ${{ secrets.DOCKERHUB_USERNAME }}
76+
password: ${{ secrets.DOCKERHUB_TOKEN }}
77+
repository: ${{ secrets.DOCKERHUB_USERNAME }}/snapdocs
78+
readme-filepath: ./README.md
79+
short-description: 'SnapDocs - Open source collaborative document workspace'

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts
38+
39+
# prisma
40+
prisma/*.db
41+
prisma/*.db-journal
42+
43+
# editor
44+
.vscode/
45+
.idea/
46+
47+
# OS
48+
Thumbs.db
49+
.DS_Store
50+
51+
# Docker volumes
52+
docker/data/

0 commit comments

Comments
 (0)