Rename zenith-pyq-clone to whaleprep

Package, binary, tracing filter, footer copy, run_server.sh and README
updated. Footer no longer attributes zenithprepare.com.
This commit is contained in:
dev 2026-10-12 08:17:40 +05:30
parent 3df1d62002
commit 5c4b8ab7f2
6 changed files with 31 additions and 31 deletions

50
Cargo.lock generated
View file

@ -3008,6 +3008,31 @@ dependencies = [
"rustls-pki-types",
]
[[package]]
name = "whaleprep"
version = "0.1.0"
dependencies = [
"anyhow",
"axum",
"base64 0.23.1",
"chrono",
"jsonwebtoken",
"rand 0.8.8",
"reqwest",
"rsa",
"serde",
"serde_json",
"serde_urlencoded",
"sha2 0.11.0",
"sqlx",
"tokio",
"tower-cookies",
"tower-http 0.7.1",
"tracing",
"tracing-subscriber",
"uuid",
]
[[package]]
name = "whoami"
version = "2.1.3"
@ -3204,31 +3229,6 @@ dependencies = [
"synstructure",
]
[[package]]
name = "zenith-pyq-clone"
version = "0.1.0"
dependencies = [
"anyhow",
"axum",
"base64 0.23.1",
"chrono",
"jsonwebtoken",
"rand 0.8.8",
"reqwest",
"rsa",
"serde",
"serde_json",
"serde_urlencoded",
"sha2 0.11.0",
"sqlx",
"tokio",
"tower-cookies",
"tower-http 0.7.1",
"tracing",
"tracing-subscriber",
"uuid",
]
[[package]]
name = "zerocopy"
version = "0.8.62"

View file

@ -1,5 +1,5 @@
[package]
name = "zenith-pyq-clone"
name = "whaleprep"
version = "0.1.0"
edition = "2024"

View file

@ -1,4 +1,4 @@
# PYQ clone
# WhalePrep
A working full-stack copy of the ZenithPrep PYQ practice app: build a paper from
JEE Main style questions, take it on a timed CBT screen with +4 / −1 marking,

View file

@ -1,13 +1,13 @@
#!/bin/bash
# Starts the clone detached so it survives shell teardown. Usage: run_server.sh <port> <db>
set -e
DIR="/home/oiupoyt/my stuff yea/projects/zenith-pyq-clone"
DIR="/home/oiupoyt/my stuff yea/projects/whaleprep"
PORT="${1:-8123}"
DB="${2:-/tmp/pyq_run.db}"
cd "$DIR"
rm -f "$DB" "$DB-wal" "$DB-shm"
PYQ_DB="$DB" PYQ_ADDR="127.0.0.1:$PORT" RUST_LOG=info \
setsid nohup ./target/debug/zenith-pyq-clone > "/tmp/pyq_server_$PORT.log" 2>&1 < /dev/null &
setsid nohup ./target/debug/whaleprep > "/tmp/pyq_server_$PORT.log" 2>&1 < /dev/null &
echo "started pid=$! port=$PORT db=$DB"
sleep 3
curl -s -o /dev/null -w "health=%{http_code}\n" "http://127.0.0.1:$PORT/"

View file

@ -32,7 +32,7 @@ async fn main() -> anyhow::Result<()> {
// Defaults to info; RUST_LOG=debug adds the query log.
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| "zenith_pyq_clone=info,sqlx=warn".into()),
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| "whaleprep=info,sqlx=warn".into()),
)
.init();
let db_path = std::env::var("PYQ_DB").unwrap_or_else(|_| "pyq.db".into());

View file

@ -81,7 +81,7 @@ fn nav(ctx: &Ctx, user: Option<&str>) -> String {
fn foot(ctx: &Ctx) -> String {
format!(
r#"<footer><span>PYQ clone · running on sqlite · built as a working copy of zenithprepare.com/PYQ</span><span><a href="{b}/terms">terms</a> · <a href="{b}/privacy">privacy</a></span></footer></body></html>"#,
r#"<footer><span>WhalePrep · JEE Main PYQ practice</span><span><a href="{b}/terms">terms</a> · <a href="{b}/privacy">privacy</a></span></footer></body></html>"#,
b = ctx.base
)
}