Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ee13d10
first phase of remodeling the worker
crosve Dec 20, 2025
565d796
working logic - still need to add in web parsing
crosve Dec 20, 2025
6ff88ea
bucketing ui deisgn v1
crosve Dec 22, 2025
367a979
new alembic version with folder table update
crosve Dec 22, 2025
1244064
folder put route working and connecting with the frontend
crosve Dec 23, 2025
cd89a8c
reverting to hardcoded ActiveMQ enviornment variables
angvit Dec 24, 2025
c6a7c67
indenting properly
crosve Dec 24, 2025
5121351
removing hard coded env variables
crosve Dec 24, 2025
65e9d97
adding psycong2 to the requirements.txt file
crosve Dec 24, 2025
2e786a1
bucket base processing(prior to testing)
crosve Dec 25, 2025
c242d13
finished v1 for bucket - not tested yet
crosve Dec 25, 2025
10be0e8
bucketing for reggex is working - need work on semantic matching'
crosve Dec 28, 2025
fd0c242
description column added to the folder and started to test matching algo
crosve Dec 29, 2025
203b05a
folder mebedding added and being generated upon folder creation'
crosve Dec 29, 2025
d4cb073
embedding is being generated when folder metadata is updated
crosve Dec 29, 2025
ad21916
first working algo for folder matching
crosve Dec 30, 2025
009a9fd
matching algo for folder improved (fuzz and centroid updated)
crosve Dec 31, 2025
edc2d83
handling edge cases when updating the folder update
crosve Dec 31, 2025
2c4498c
fixing overflowing of content
crosve Dec 31, 2025
95b7ed2
aligning the google signup button
crosve Jan 1, 2026
cc0d9a7
folder selection is available now
crosve Jan 1, 2026
0879442
folder penalization and some UI fixes
crosve Jan 2, 2026
52318ec
keeping it to only remove fodlers
crosve Jan 2, 2026
3e1574e
fixing merge conflict
crosve Jan 2, 2026
cdf56f2
fixing build issue
crosve Jan 2, 2026
a7fdc45
fixing input props for build
crosve Jan 2, 2026
9efb781
Merge pull request #74 from crosve/bucketing-feature
crosve Jan 2, 2026
3d88d14
pyscong version
crosve Jan 2, 2026
b3faf7c
Merge pull request #75 from crosve/bucketing-feature
crosve Jan 2, 2026
934a5fe
adding in psycong
crosve Jan 2, 2026
4ce8c44
updating the worker requiremnts
crosve Jan 2, 2026
a1a0a50
updating schema for MessageSchema
crosve Jan 2, 2026
4b2daa2
fixing title issue
crosve Jan 2, 2026
d31a2b9
fixing bucket processor issues
crosve Jan 2, 2026
13d24ee
refactoring api routes
crosve Jan 5, 2026
669d697
more refacoring for api routes
crosve Jan 6, 2026
dec50b5
updating the content routes
crosve Jan 6, 2026
b9c8fb4
use tags can now be added
crosve Jan 8, 2026
8ec7600
added demo video, cleaned up bookmark modal, and unified color scheme
angvit Jan 8, 2026
62380f3
Merge branch 'main' of https://github.com/crosve/Csphere
crosve Jan 20, 2026
7c251f4
updating the most up to date changes for main
crosve Jan 20, 2026
d7d9807
users are able to add tags and bulk delete them
crosve Jan 20, 2026
d4ac31e
user can input their edit
crosve Jan 20, 2026
a5323a9
adding in tag creation and editing
crosve Jan 21, 2026
85c9037
Merge pull request #76 from crosve/refactor-backend
crosve Jan 21, 2026
e6029ed
working code for firefox extension and fixing environment imports wit…
angvit Jan 22, 2026
2a860fc
restoring extension WIP from stash
angvit Jan 22, 2026
2c15b13
swicthing the bucket env name back
crosve Jan 22, 2026
f6a88c4
Renaming S3 environment variable and importing settings with get_sett…
angvit Jan 22, 2026
f904b6c
Merge branch 'main' of https://github.com/crosve/Csphere
angvit Jan 22, 2026
2b90019
fixing auth.py bucket naming
angvit Jan 22, 2026
1ac4b2e
working extension code for chrome and firefox browsers
angvit Jan 22, 2026
6da2407
some chrome etension changes - added the folder selection tab
crosve Jan 22, 2026
2080408
user tags are displayed and shown
crosve Jan 23, 2026
98bc73b
tag logic workaround - encountering pydnatic model parsing
crosve Jan 23, 2026
03809b1
new database revisions and tag insertion
crosve Jan 23, 2026
fe71d85
fixing category selection
crosve Jan 23, 2026
6e415a3
Merge branch 'main' of https://github.com/crosve/Csphere
crosve Jan 23, 2026
5ae1898
merging in main updates
crosve Jan 23, 2026
eac1b19
finalzing merged changes
crosve Jan 23, 2026
993fe10
Merge pull request #77 from crosve/chrome
crosve Jan 23, 2026
50c6a91
chrome bookmark extraction is logic is in place now
crosve Jan 24, 2026
df26004
bookmark from chrome export
crosve Jan 25, 2026
ebd837d
adding in user embedding for redsicover logic
crosve Jan 26, 2026
2b02181
updating the ci/cd pipeline
crosve Jan 26, 2026
d6cd08c
new embedding worker
crosve Jan 27, 2026
43aeb80
some further work with the embedding worker updated
crosve Jan 28, 2026
54a99ee
embedding worker v1 is functional
crosve Feb 2, 2026
d12a6ec
bookmarks showing up for redscovery page
crosve Feb 2, 2026
8f4a67f
kinor changes and updates
crosve Feb 2, 2026
f3c95ad
adding in the summary to the bookmark cards
crosve Feb 2, 2026
c9726c9
removed new keyword
crosve Feb 2, 2026
4f429e0
Merge pull request #78 from crosve/chrome
crosve Feb 2, 2026
eb61334
adding toml configs
crosve Feb 2, 2026
75048c0
Merge pull request #79 from crosve/chrome
crosve Feb 2, 2026
ce26536
exmaple env file
crosve Feb 3, 2026
20769f0
adding frontend env example
crosve Feb 4, 2026
8b19106
adding in some worker bug fixes - embedding issue
crosve Feb 4, 2026
0f64708
reorganized folder structure
crosve Feb 5, 2026
b317f8f
new layout for redsicover page and tags page
crosve Feb 9, 2026
9e96b1a
some minot changes - nothing really
crosve Feb 9, 2026
fce8fa0
deleting useless openai key
crosve Feb 9, 2026
a069c36
singlefile screenshot of page
crosve Feb 10, 2026
30bd023
adding work done to get snapshot of page
crosve Feb 11, 2026
8e06543
added in the requirements for csphere worker
crosve Feb 11, 2026
4e6ed16
updating browser args
crosve Feb 11, 2026
7908715
forgot to do a json dump
crosve Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 84 additions & 27 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,68 @@ on:
- main

jobs:
confirm-changes:
name: confirm there are changes in the backend
deploy-backend:
name: deploy backend to tiptops server
runs-on: ubuntu-latest
outputs:
folder_changed: ${{ steps.check_files.outputs.folder_changed }}
steps:
- uses: actions/checkout@v4
- name: Execute remote ssh commands using passwords
uses: appleboy/ssh-action@v1
with:
fetch-depth: 2

- name: Find name of changes files with git
id: check_files
run: |
set +e
CHANGED_FILES=$(git diff --name-only ${{github.event.before}} ${{github.sha}} || true)
echo "changed files found: $CHANGED_FILES"

CHANGED_COUNT=$(echo "$CHANGED_FILES" | grep -c "backend")
host: ${{secrets.HOST}}
username: ${{secrets.USERNAME}}
password: ${{secrets.PASSWORD}}
port: ${{secrets.PORT}}

set -e
echo "file count that was changed: $CHANGED_COUNT"
script: |
echo "Starting deployment process"
# NOTE: Use 'sh' to avoid issues with inline script quoting
sudo -S bash -c '
cd /root/docker/csphere
#run the deployment script
./build-csphere-backend.sh
echo "deployment was a success"
' <<< "${{secrets.PASSWORD}}"

if [ "$CHANGED_COUNT" -gt 0 ]; then
echo "folder_changed=true" >> $GITHUB_OUTPUT
- name: Slack Notification
if: always()
run: |
if [[ "${{ job.status }}" == "success" ]]; then
STATUS_TEXT="Deployment Successful"
COLOR="#098824"
else
echo "folder_changed=false" >> $GITHUB_OUTPUT
STATUS_TEXT="Deployment Failed"
COLOR="#a80a0a"
fi

deploy-backend:
name: deploy backend to tiptops server
runs-on: ubuntu-latest
# needs: confirm-changes
REPO_URL="https://github.com/${{ github.repository }}"
RUN_URL="$REPO_URL/actions/runs/${{ github.run_id }}"
COMMIT_URL="$REPO_URL/commit/${{ github.sha }}"

curl -X POST -H 'Content-type: application/json; charset=utf-8' \
-H "Authorization: Bearer ${{ secrets.SLACK_TOKEN }}" \
--data "{
\"channel\": \"${{ secrets.SLACK_CHANNEL }}\",
\"attachments\": [
{
\"color\": \"$COLOR\",
\"title\": \"Csphere CI/CD Update - Backend\",
\"title_link\": \"$RUN_URL\",
\"text\": \"$STATUS_TEXT\n\n*Repository:* ${{ github.repository }}\n*Branch:* \`${{ github.ref_name }}\` \n*Commit:* <$COMMIT_URL|${{ github.event.head_commit.message }}>\n*Author:* ${{ github.actor }}\",
\"footer\": \"GitHub Actions • Build #${{ github.run_number }}\",
\"ts\": $(date +%s)
}
]
}" \
https://slack.com/api/chat.postMessage

deploy-worker:
name: deploy worker to the backend servers
runs-on: ununtu-latest

steps:
- name: Execute remote ssh commands using passwords
# if: needs.confirm-changes.outputs.folder_changed == 'true'
- name: Execute remote ssh commands
uses: appleboy/ssh-action@v1

with:
host: ${{secrets.HOST}}
username: ${{secrets.USERNAME}}
Expand All @@ -55,6 +80,38 @@ jobs:
sudo -S bash -c '
cd /root/docker/csphere
#run the deployment script
./build-csphere-backend.sh
./build-csphere-worker.sh
echo "deployment was a success"
' <<< "${{secrets.PASSWORD}}"

- name: Slack Notification
if: always()
run: |
if [[ "${{ job.status }}" == "success" ]]; then
STATUS_TEXT="Deployment Successful"
COLOR="#098824"
else
STATUS_TEXT="Deployment Failed"
COLOR="#a80a0a"
fi

REPO_URL="https://github.com/${{ github.repository }}"
RUN_URL="$REPO_URL/actions/runs/${{ github.run_id }}"
COMMIT_URL="$REPO_URL/commit/${{ github.sha }}"

curl -X POST -H 'Content-type: application/json; charset=utf-8' \
-H "Authorization: Bearer ${{ secrets.SLACK_TOKEN }}" \
--data "{
\"channel\": \"${{ secrets.SLACK_CHANNEL }}\",
\"attachments\": [
{
\"color\": \"$COLOR\",
\"title\": \"Csphere CI/CD Update - worker\",
\"title_link\": \"$RUN_URL\",
\"text\": \"$STATUS_TEXT\n\n*Repository:* ${{ github.repository }}\n*Branch:* \`${{ github.ref_name }}\` \n*Commit:* <$COMMIT_URL|${{ github.event.head_commit.message }}>\n*Author:* ${{ github.actor }}\",
\"footer\": \"GitHub Actions • Build #${{ github.run_number }}\",
\"ts\": $(date +%s)
}
]
}" \
https://slack.com/api/chat.postMessage
42 changes: 0 additions & 42 deletions .github/workflows/heroku.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DATABASE_URL=

SECRET_KEY=

OPENROUTER_API_KEY=

NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8000
GOOGLE_API_KEY=
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
BUCKET_NAME =
GOOGLE_REDIRECT_URI=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

ACTIVEMQ_QUEUE=


ACTIVEMQ_URL=
ACTIVEMQ_QUEUE=
ACTIVEMQ_USER=
ACTIVEMQ_PASS=
3 changes: 3 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ __pycache__/
app/data_models/__pycache__/**

/dockerfile


/archives/*
1 change: 1 addition & 0 deletions backend/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from app.data_models.folder_item import folder_item
from app.data_models.category import Category
from app.data_models.content_category import ContentCategory
from app.data_models.tag import Tag

target_metadata = Base.metadata

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""adding html url for static web rendering

Revision ID: 10a2bc716159
Revises: 82732e62263b
Create Date: 2026-02-10 12:10:19.134266

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '10a2bc716159'
down_revision: Union[str, None] = '82732e62263b'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('content', sa.Column('html_content_url', sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('content', 'html_content_url')
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""folder_embedding column in folder table

Revision ID: 1e2cab304cac
Revises: c32fb8abe107
Create Date: 2025-12-29 15:15:04.787853

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from pgvector.sqlalchemy import Vector



# revision identifiers, used by Alembic.
revision: str = '1e2cab304cac'
down_revision: Union[str, None] = 'c32fb8abe107'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###

#sa.Column('embedding', Vector(dim=1536), nullable=True),
op.add_column('folder', sa.Column('folder_embedding', Vector(dim=1536), nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('folder', 'folder_embedding')
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""adding bucketing mode boolean column to Folder table

Revision ID: 2994a72baf17
Revises: 9076b42a5b56
Create Date: 2025-12-23 12:56:56.367544

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision: str = '2994a72baf17'
down_revision: Union[str, None] = '9076b42a5b56'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('folder', sa.Column('bucketing_mode', sa.Boolean(), nullable=True))

op.execute("UPDATE folder SET bucketing_mode = false")

op.alter_column("folder", "bucketing_mode", nullable=False)

op.execute("UPDATE folder SET keywords = ARRAY[]::VARCHAR[]")

op.execute("UPDATE folder SET url_patterns = ARRAY[]::VARCHAR[]")

op.alter_column('folder', 'keywords',
existing_type=postgresql.ARRAY(sa.VARCHAR()),
nullable=False)
op.alter_column('folder', 'url_patterns',
existing_type=postgresql.ARRAY(sa.VARCHAR()),
nullable=False)
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('folder', 'url_patterns',
existing_type=postgresql.ARRAY(sa.VARCHAR()),
nullable=True)
op.alter_column('folder', 'keywords',
existing_type=postgresql.ARRAY(sa.VARCHAR()),
nullable=True)
op.drop_column('folder', 'bucketing_mode')
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""adding in foreign contraint

Revision ID: 4a23460e20b9
Revises: 55170ec071fa
Create Date: 2026-01-23 12:11:14.992338

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '4a23460e20b9'
down_revision: Union[str, None] = '55170ec071fa'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('content_tag', sa.Column('user_id', sa.UUID(), nullable=False))
op.drop_constraint(op.f('content_tag_content_id_fkey'), 'content_tag', type_='foreignkey')
op.create_foreign_key(None, 'content_tag', 'content_item', ['content_id', 'user_id'], ['content_id', 'user_id'])
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'content_tag', type_='foreignkey')
op.create_foreign_key(op.f('content_tag_content_id_fkey'), 'content_tag', 'content', ['content_id'], ['content_id'])
op.drop_column('content_tag', 'user_id')
# ### end Alembic commands ###
Loading