Commit graph

35 commits

Author SHA1 Message Date
bkellam
ed0d28a4f0 fix issue with yarn dev startup 2025-01-23 10:58:42 -08:00
Michael Sukkarieh
a5006c52fe
Migrate to postgres (#174)
* spin up postgres in docker container

* get initial pol of postgres db working in docker image

* spin up postgres server in dev case

* updated syncedAt date after config sync:

* remove unnecessary port expose in docker file
2025-01-23 10:23:46 -08:00
Michael Sukkarieh
7c6adf17aa
Multi tenancy support in config syncer (#171)
* [wip] initial mt support in config syncer

* Move logout button & profile picture into settings dropdown (#172)

* update sync status properly and fix bug with multiple config in db case

* make config path required in single tenant mode

NOTE: deleting config/repos is currently not supported in multi tenancy case. Support for this will be added in a future PR

---------

Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>
2025-01-21 11:50:35 -08:00
Brendan Kellam
6cf10b4988
Authentication (#164) 2025-01-16 15:24:13 -08:00
Michael Sukkarieh
7029aa70c1
parallelize repo indexing (#163)
* hacked together a example of using zoekt grpc api

* provide tenant id to zoekt git indexer

* update zoekt version to point to multitenant branch

* pipe tenant id through header to zoekt

* remove incorrect submodule reference and settings typo

* update zoekt commit

* remove unused yarn script

* remove unused grpc client in web server

* remove unneeded deps and improve tenant id log

* pass tenant id when creating repo in db

* add mt yarn script

* add pol of bullmq into backend

* add better error handling and concurrency setting

* spin up redis instance in dockerfile

* cleanup transaction logic when adding repos to index queue

* add NEW index status fetch condition

* move bullmq deps to backend

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>
2025-01-15 15:44:42 -08:00
Michael Sukkarieh
553f5d25f7
Add tenant ID concept into web app and backend (#160)
* hacked together a example of using zoekt grpc api

* provide tenant id to zoekt git indexer

* update zoekt version to point to multitenant branch

* pipe tenant id through header to zoekt

* remove incorrect submodule reference and settings typo

* update zoekt commit

* remove unused yarn script

* remove unused grpc client in web server

* remove unneeded deps and improve tenant id log

* pass tenant id when creating repo in db

* add mt yarn script

* add nocheckin comment to tenant id in v2 schema

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>
2025-01-14 16:46:36 -08:00
Brendan Kellam
7f952ce163
Search suggestions (#85)
The motivation for building search suggestions is two-fold: (1) to make the zoekt query language more approachable by presenting all available options to the user, and (2) make it easier for power-users to craft complex queries.

The meat-n-potatoes of this change are concentrated in searchBar.tsx and searchSuggestionBox.tsx. The suggestions box works by maintaining a state-machine of "modes". By default, the box is in the refine mode, where suggestions for different prefixes (e.g., repo:, lang:, etc.) are suggested to the user. When one of these prefixes is matched, the state-machine transitions to the corresponding mode (e.g., repository, language, etc.) and surfaces suggestions for that mode (if any).

The query is split up into parts by spaces " " (e.g., 'test repo:hello' -> ['test', 'repo:hello']). See splitQuery. The part that has the cursor over it is considered the active part. We evaluate which mode the state machine is in based on the active part. When a suggestion is clicked, we only modify the active part of the query.

Three modes are currently missing suggestion data: file (file names), revision (branch / tag names), and symbol (symbol names). In future PRs, we will need to introduce endpoints into the backend to allow the frontend to fetch this data and surface it as suggestions..
2024-11-22 18:50:13 -08:00
Brendan Kellam
9cba4f274f
Add unit testing library to @sourcebot/backend (#65) 2024-11-12 18:37:35 -08:00
Brendan Kellam
fc8815d135
Config format V2 (#42) 2024-10-17 16:31:18 -04:00
bkellam
34a4c336c7 switch to using prettyBytes for repos table 2024-09-26 13:03:23 -07:00
dependabot[bot]
a51a5e2764
Bump next from 14.2.6 to 14.2.10 (#8)
Bumps [next](https://github.com/vercel/next.js) from 14.2.6 to 14.2.10.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.6...v14.2.10)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 22:11:54 -07:00
bkellam
62d4e8ec2e more syntax highlighting support 2024-09-24 21:12:49 -07:00
Michael Sukkarieh
03fc50afd2
various README fixes (#3)
* add instructions on adding GITHUB_TOKEN as env variable on machine

* add .github-token to gitignore and add additional info in build instructions

* remove github-token from gitignore because its meant to be in home dir. Bold this part in the README so its more clear

* add ctags installation instructions to readme

* link to ctags repo in README

* remove unnecessary line change in gitignore
2024-09-19 13:28:10 -07:00
Brendan Kellam
1c756d2010
Add repo carousel and "how to search" section to homepage (#5) 2024-09-18 22:26:00 -07:00
msukkari
71717ac4b5 remove parentheses usage in package.json 2024-09-18 17:12:33 -07:00
bkellam
b9694c9c76 document building locally 2024-09-17 23:06:00 -07:00
bkellam
90284413e0 python & markdown syntax highlighting 2024-09-17 20:35:53 -07:00
bkellam
3ef9be2b6b Add PostHog telemetry support 2024-09-16 21:37:34 -07:00
bkellam
9a8d17b4c0 Revert "Add missing dependencies"
This reverts commit bb92366cc2.
2024-09-16 11:57:49 -07:00
bkellam
bb92366cc2 Add missing dependencies 2024-09-12 19:55:50 -07:00
bkellam
1283f6487f Add page to list indexed repositories 2024-09-10 21:55:00 -07:00
bkellam
4e5deb22a1 Escape regex when searching for a specific filepath + some error handling / schema adjustments 2024-09-10 12:24:12 -07:00
bkellam
dd80630f74 Add hotkey to focus search bar 2024-09-02 19:19:22 -07:00
bkellam
45c176f7ae Several things: (1) Add a basic landing page and move search into /search route. (2) Make the search bar a form instead of being fancy and using debounce. (3) Add react-query for better query handling. 2024-09-02 18:46:43 -07:00
bkellam
1250c160c0 Add sourcebot Dockerfile 2024-08-30 20:00:58 -07:00
bkellam
5e07ff7933 Add eslint 2024-08-29 21:38:48 -07:00
bkellam
4fc2357fb1 Add basic match highlighting 2024-08-29 17:47:35 -07:00
bkellam
a83eef57e2 Add settings dropdown 2024-08-27 21:00:59 -07:00
bkellam
c73325d8ce Add vim support to code viewer 2024-08-27 17:04:50 -07:00
bkellam
87ad7ef981 Add theme toggle 2024-08-26 20:54:15 -07:00
bkellam
3fc3397f01 Display selected file in code preview 2024-08-25 21:30:09 -07:00
bkellam
e828d53910 wip on integrating codemirror 2024-08-25 17:57:34 -07:00
bkellam
e18c3e26d7 Code panel skeleton 2024-08-24 23:01:46 -07:00
bkellam
49c38e99d5 wip - add shadcn, api router, and some other stuff 2024-08-24 17:45:44 -07:00
bkellam
e99565edcd init nextjs project 2024-08-23 13:54:13 -07:00