Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ copy-stg *args:
backend-dev *args:
dotenvx run -f .env -f .env.shared -- bash ./mvnw -Dspring-boot.run.profiles=dev spring-boot:run {{args}}

# Run the leetcode auth service
las-dev *args:
cd ./internal/leetcode-auth-service && cargo build && dotenvx run -f ../../.env -- cargo run

# Run the leetcode auth stealer service
auth-dev *args:
lass-dev *args:
cd ./internal/leetcode-auth-stealer-service && uv sync && GRPC_REFLECTION=true GRPC_VERBOSITY=ERROR uv run src/server.py

# Generate the leetcode auth stealer gRPC stubs for the main codebloom service
auth-gen *args:
lass-gen *args:
cd ./internal/leetcode-auth-stealer-service && uv sync && uv run src/generate.py

# Run the backend Spring server with an exposed debugger at :5005
Expand Down Expand Up @@ -85,7 +89,7 @@ email-gen *args:

# Run the dev servers (backend & frontend & auth service)
dev *args:
npx concurrently "just backend-dev" "just frontend-dev" "just auth-dev" {{args}}
npx mprocs "just backend-dev" "just frontend-dev" "just las-dev" "just lass-dev" {{args}}

# Run the dev servers (backend & frontend & auth service) but the backend will launch a debugger server.
devd *args:
Expand Down
22 changes: 9 additions & 13 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ DISCORD_REPORTING_CHANNEL_ID=
DISCORD_REPORTING_LOG_GUILD_ID=
DISCORD_REPORTING_LOG_CHANNEL_ID=

# required for auth.
# sent to LASS to get an auth token for leetcode.com
# for local, you can just create a regular account on leetcode.com
# and put the username & password below.
LEETCODE_AUTH_USERNAME=
LEETCODE_AUTH_PASSWORD=

# unset will point LASS (Leetcode Auth Stealer Service) to localhost:50051
# uncomment these to use staging LASS (must be on VPN).
# GRPC_LASS_HOST=stg.codebloom-leetcode-auth-stealer-service.vpn.patinanetwork.org:50051
Expand All @@ -47,10 +40,6 @@ GRPC_LASS_TIMEOUT=
GH_USERNAME=
GH_PASSWORD=

# the new default auth stealer configuration
LEETCODE_AUTH_USERNAME=
LEETCODE_AUTH_PASSWORD=

# optional for auth, can skip
# You must attach the email used for the Github account, as the GitHub page may require a 2FA code.
# As of right now, you must use port 143 as it is configured to use unencrypted IMAP.
Expand Down Expand Up @@ -87,6 +76,13 @@ SECRET_KEY=<changeme>
# needs to go through the frontend.
SERVER_URL=http://localhost:5173

# required
# Redis URL
# read by leetcode-auth-service
LEETCODE_AUTH_USERNAME=
LEETCODE_AUTH_PASSWORD=
REDIS_URL=redis://localhost:6379/0
LASS_URL=http://localhost:50051
LASS_TIMEOUT_SECONDS=180
REFRESH_LOCK_TTL_SECONDS=210
REFRESH_CHECK_INTERVAL_SECONDS=900
TOKEN_MAX_AGE_SECONDS=14400
GRPC_REFLECTION=true
4 changes: 3 additions & 1 deletion internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ This directory houses applications & services that are more related to the devel

## Structure

_Last updated: 02/14/2026_
_Last updated: 11/03/2026_

This `internal/` directory currently consists of

- `standup-bot`: a Discord bot written in [Rust](https://rust-lang.org/) to send daily standup messages to our private Discord server.
- [View detailed documentation](./standup-bot/README.md)
- [View detailed documentation](./scripts/README.md)
- `leetcode-auth-service`: a Rust gRPC service that stores the leetcode.com credentials in Redis and refreshes them through `leetcode-auth-stealer-service`.
- [View detailed documentation](./leetcode-auth-service/README.md)
- `leetcode-auth-stealer-service`: a Python gRPC authentication service that replaces the old auth stealer service with a direct email/password one.
- [View detailed documentation](./leetcode-auth-stealer-service/README.md)
7 changes: 7 additions & 0 deletions internal/leetcode-auth-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
src/proto

/target
.env

clippy-report.json
lcov.info
Loading