# HG changeset patch
# User June Park
# Date 1767973324 28800
# Node ID b230a743a01ea968812835a899594dd9a12ee5fb
# Parent f7860f491a8c7b965bcf7f4f2405266618e757d2# Parent 3a564ffb2092600bf5415523fc320ccebadd3b96
Added blog.
diff -r 3a564ffb2092 -r b230a743a01e .bazelrc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.bazelrc Fri Jan 09 07:42:04 2026 -0800
@@ -0,0 +1,5 @@
+# Auto-select config based on host OS
+common --enable_platform_specific_config
+
+# Suppress duplicate library warnings from openssl BCR module on macOS
+build:macos --linkopt=-Wl,-no_warn_duplicate_libraries
diff -r 3a564ffb2092 -r b230a743a01e gara/BUILD
--- a/gara/BUILD Fri Jan 09 07:19:09 2026 -0800
+++ b/gara/BUILD Fri Jan 09 07:42:04 2026 -0800
@@ -3,7 +3,7 @@
cc_binary(
name = "gara_c",
srcs = ["main.c"],
- deps = ["//seobeo:seobeo"],
+ deps = ["//seobeo:seobeo_min"],
)
diff -r 3a564ffb2092 -r b230a743a01e gara/gara
Binary file gara/gara has changed
diff -r 3a564ffb2092 -r b230a743a01e gui_ze/gui_ze.bzl
--- a/gui_ze/gui_ze.bzl Fri Jan 09 07:19:09 2026 -0800
+++ b/gui_ze/gui_ze.bzl Fri Jan 09 07:42:04 2026 -0800
@@ -32,7 +32,6 @@
for directory in f.path.split("/"):
if directory == binary.short_path.split("/")[0]:
break
- print("\n\n equals: ", directory, binary.short_path.split("/")[0]);
start += 1
# Remove the first folder (output) and last file (actaul files that needed to be copied)
@@ -49,9 +48,6 @@
command = " && ".join(copy_cmd),
progress_message = "Bundling {}".format(ctx.label.name),
)
-
- print("[INFO] See {}".format(out_dir.path))
-
return [DefaultInfo(files = depset([out_dir]))]
bundle = rule(
diff -r 3a564ffb2092 -r b230a743a01e hg-web/BUILD
--- a/hg-web/BUILD Fri Jan 09 07:19:09 2026 -0800
+++ b/hg-web/BUILD Fri Jan 09 07:42:04 2026 -0800
@@ -26,11 +26,3 @@
name = "hg_web_server_bundle",
binary = ":hg_web_server",
)
-
-cc_binary(
- name = "hg_web_server_dev",
- srcs = ["main.c"],
- deps = ["//seobeo:seobeo_server_dev"],
- data = [":src_files"],
- defines = ["REPO_ROOT=\\\"\"/Users/mrjunejune/zenbu\"\\\""],
-)
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/BUILD
--- a/mrjunejune/BUILD Fri Jan 09 07:19:09 2026 -0800
+++ b/mrjunejune/BUILD Fri Jan 09 07:42:04 2026 -0800
@@ -1,8 +1,8 @@
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load("@rules_cc//cc:cc_library.bzl", "cc_library")
-# load("@rules_python//python:py_binary.bzl", "py_binary")
load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle")
+# Files
move_files_into_dir(
name = "compiled_ts_games",
srcs = [
@@ -14,7 +14,6 @@
move_files_into_dir(
name = "compiled_ts",
srcs = [
- "//playground:hello",
"//markdown_converter:markdown_to_html",
],
dest = "src",
@@ -23,22 +22,26 @@
filegroup(
name = "src_files",
srcs = glob(["src/**"]) + [":compiled_ts", ":compiled_ts_games"],
+ visibility = ["//mrjunejune/test:__pkg__"],
)
+# Server binary
cc_binary(
name = "mrjunejune_server",
srcs = ["main.c"],
- deps = ["//seobeo:seobeo_server"],
+ deps = ["//seobeo:seobeo_tcp_server_ws"],
data = [":src_files"],
+ visibility = ["//mrjunejune/test:__pkg__"],
)
cc_binary(
name = "mrjunejune_server_dev",
srcs = ["main.c"],
- deps = ["//seobeo:seobeo_server_dev"],
+ deps = ["//seobeo:seobeo_tcp_server_ws"],
data = [":src_files"],
)
+# Rlease bundle
bundle(
name = "mrjunejune_server_bundle",
binary = ":mrjunejune_server",
@@ -49,45 +52,8 @@
binary = ":mrjunejune_server_dev",
)
-cc_test(
- name = "integration_test",
- srcs = ["test/integration_test.c"],
- deps = ["//seobeo:seobeo_client"],
- data = [
- "//mrjunejune:mrjunejune_server",
- "//mrjunejune:src_files",
- "//mrjunejune:test_snapshots",
- "//mrjunejune:test_files",
- ],
- size = "large",
- timeout = "long",
- args = ["$(location //mrjunejune:mrjunejune_server)"],
-)
-
-cc_binary(
- name = "create_snapshots",
- srcs = ["test/create_snapshots.c"],
- deps = ["//seobeo:seobeo_client"],
- data = [
- "//mrjunejune:mrjunejune_server",
- "//mrjunejune:src_files",
- ],
- args = ["$(location //mrjunejune:mrjunejune_server)"],
-)
-
-filegroup(
- name = "test_snapshots",
- srcs = glob(["test/snapshots/**"]),
-)
-
-filegroup(
- name = "test_files",
- srcs = [
- "test/shiba.webp",
- "test/test_avi.avi",
- ],
-)
-
+# Experimenting with python to see if I can call it as ffi.
+# load("@rules_python//python:py_binary.bzl", "py_binary")
# This was to use python ffi, but w/e
# cc_library(
# name = "mrjunejune_server_lib",
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/main.c
--- a/mrjunejune/main.c Fri Jan 09 07:19:09 2026 -0800
+++ b/mrjunejune/main.c Fri Jan 09 07:42:04 2026 -0800
@@ -1,3 +1,4 @@
+#define SEOBEO_ENABLE_DEBUG
#include "seobeo/seobeo.h"
#include
@@ -473,16 +474,40 @@
return resp;
}
+void Chat_Handler(Seobeo_WebSocket_Server_Connection *p_conn, Seobeo_WebSocket_Message *p_msg, void *p_user_data)
+{
+ (void)p_user_data;
+
+ if (p_msg->opcode == SEOBEO_WS_OPCODE_TEXT)
+ {
+ char message[2048];
+ snprintf(message, sizeof(message), "[%s]: %.*s", p_conn->client_id, (int)p_msg->length, (char*)p_msg->data);
+
+ Seobeo_Log(SEOBEO_INFO, "[Chat] Broadcasting: %s\n", message);
+ Seobeo_WebSocket_Server_Broadcast_Text(message, p_conn);
+ }
+}
+
+Seobeo_Request_Entry *GetTalk(Seobeo_Request_Entry *req, Dowa_Arena *arena)
+{
+ Seobeo_Request_Entry *resp = NULL;
+ char *final_body = Dowa_Arena_Allocate(arena, 50 * 1024);
+ Seobeo_ServerSideRender(final_body, "/talk/index.html", arena);
+ Dowa_HashMap_Push_Arena(resp, "body", final_body, arena);
+ return resp;
+}
CREATE_REDIRECT_HANDLER(HomePage, "/")
CREATE_REDIRECT_HANDLER(Resume, "/resume")
CREATE_REDIRECT_HANDLER(Tools, "/tools")
CREATE_REDIRECT_HANDLER(MarkDownToHtml, "/tools/markdown_to_html")
CREATE_REDIRECT_HANDLER(FileConverter, "/tools/file_converter")
+CREATE_REDIRECT_HANDLER(Talk, "/talk")
int main(void)
{
Seobeo_Router_Init();
+
Seobeo_Router_Register("GET", "/", GetHomePage);
Seobeo_Router_Register("GET", "/index.html", GetRedirectHomePage);
@@ -507,5 +532,15 @@
Seobeo_Router_Register("GET", "/blog", RenderBlogList);
Seobeo_Router_Register("GET", "/blog/:blog_id", RenderBlog);
+ // -- Talk --/
+ Seobeo_Router_Register("GET", "/talk", GetTalk);
+ // TODO: Bug where I can't est redriect huh...
+ Seobeo_Router_Register("GET", "/talk/index.html", GetRedirectTalk);
+
+ printf("Registered Websockets\n");
+
+ Seobeo_WebSocket_Server_Init();
+ Seobeo_WebSocket_Server_Register("/chat", Chat_Handler, NULL);
+
Seobeo_Web_Server_Start("mrjunejune/src", "6969", SEOBEO_MODE_EDGE, 3);
}
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/python_server.py
--- a/mrjunejune/python_server.py Fri Jan 09 07:19:09 2026 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-from cffi import FFI
-import os
-
-ffi = FFI()
-ffi.cdef("void start_server(void);")
-
-# Bazel runs binaries from a sandbox, so use runfiles to locate the .so
-import pathlib
-runfiles_dir = pathlib.Path(__file__).parent
-libpath = runfiles_dir / "mrjunejune_server_so.so"
-
-C = ffi.dlopen(str(libpath))
-C.start_server()
-
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/server_entry.c
--- a/mrjunejune/server_entry.c Fri Jan 09 07:19:09 2026 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#include "seobeo/seobeo.h"
-
-void start_server(void) {
- Seobeo_Web_Server_Start("mrjunejune/pages", "6969", SEOBEO_MODE_EDGE, 2);
-}
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/src/blog/websocket-demystified/index.md
--- a/mrjunejune/src/blog/websocket-demystified/index.md Fri Jan 09 07:19:09 2026 -0800
+++ b/mrjunejune/src/blog/websocket-demystified/index.md Fri Jan 09 07:42:04 2026 -0800
@@ -31,9 +31,11 @@
To start the upgrade from HTTP to WebSocket, the client sends a standard GET request but with some very specific headers.
+
+
I’m assuming you know how HTTP works. If not, you can open a developer tool by right clicking on your browser and seeing into network tab and refershign the page. The only interesting values here is the `Sec-WebSocket-Key`. This key is usually a 16-byte random value encoded in **Base64**.
-> **Note:** It’s not for security—it’s to prevent intermediate caches from accidentally serving a cached WebSocket response to a different client.
+**Note:** It’s not for security—it’s to prevent intermediate caches from accidentally serving a cached WebSocket response to a different client.
But before we jump into that, we need to construct that Base64 key.
@@ -43,6 +45,7 @@
> "Base64 is a binary-to-text encoding scheme that represents data in an ASCII string format by translating it into a radix-64 representation, using a specific set of 64 printable characters." — Gemini
+
Nice, it didn't halluciante. Let's constracut these. Here they are 64 characters that are safe to print in ASCII.:
```c
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/src/parts/base_head.html
--- a/mrjunejune/src/parts/base_head.html Fri Jan 09 07:19:09 2026 -0800
+++ b/mrjunejune/src/parts/base_head.html Fri Jan 09 07:42:04 2026 -0800
@@ -5,10 +5,10 @@
-
-
+
+
-
+
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/src/public/web-socket-header.png
Binary file mrjunejune/src/public/web-socket-header.png has changed
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/src/talk/index.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/src/talk/index.html Fri Jan 09 07:42:04 2026 -0800
@@ -0,0 +1,66 @@
+
+
+
+
+ Talk!
+ {{/parts/base_head.html}}
+
+
+
+ {{/parts/header.html}}
+
Talks
+
+
+
+
+
+
+
+ {{/parts/footer.html}}
+
+
+
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/test/BUILD
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/test/BUILD Fri Jan 09 07:42:04 2026 -0800
@@ -0,0 +1,48 @@
+load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
+load("@rules_cc//cc:cc_test.bzl", "cc_test")
+load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle")
+
+# Files needed for test
+filegroup(
+ name = "test_snapshots",
+ srcs = glob(["snapshots/**"]),
+)
+
+filegroup(
+ name = "test_files",
+ srcs = [
+ "shiba.webp",
+ "test_avi.avi",
+ ],
+)
+
+# To create a snapsho to compare
+cc_binary(
+ name = "create_snapshots",
+ srcs = ["auto_generated_test.c", "test.h"],
+ deps = ["//seobeo:seobeo_tcp_client"],
+ data = [
+ "//mrjunejune:mrjunejune_server",
+ "//mrjunejune:src_files",
+ ],
+ args = ["$(location //mrjunejune:mrjunejune_server)"],
+)
+
+# Tests
+cc_test(
+ name = "integration_test",
+ srcs = [
+ "integration_test.c",
+ "test.h"
+ ],
+ deps = ["//seobeo:seobeo_tcp_client"],
+ data = [
+ "//mrjunejune:mrjunejune_server",
+ "//mrjunejune:src_files",
+ ":test_snapshots",
+ ":test_files",
+ ],
+ size = "large",
+ timeout = "long",
+ args = ["$(location //mrjunejune:mrjunejune_server)"],
+)
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/test/auto_generated_test.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/test/auto_generated_test.c Fri Jan 09 07:42:04 2026 -0800
@@ -0,0 +1,45 @@
+// Auto-generated test file
+// Source: /Users/mrjunejune/zenbu/mrjunejune/main.c
+// DO NOT EDIT - Regenerate with: bazel run //seobeo:test_generator
+
+#include "mrjunejune/test/test.h"
+
+#define TEST_HOST "127.0.0.1"
+#define TEST_PORT "6969"
+
+int main(int argc, char *argv[])
+{
+ printf("=== Auto-generated Snapshot Creator ===\n\n");
+
+ const char *server_binary = "./server";
+ if (argc > 1) server_binary = argv[1];
+
+ pid_t server_pid = start_test_server(server_binary);
+ if (server_pid < 0) return 1;
+
+ SnapshotConfig configs[] = {
+ {"/", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/resume", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/resume/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools/markdown_to_html", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools/markdown_to_html/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools/file_converter", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/tools/file_converter/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ // TODO: POST route - POST /api/convert/image-to-webp - requires request body
+ // TODO: POST route - POST /api/convert/video-to-mp4 - requires request body
+ // TODO: Dynamic route - GET /api/download/:filename - fill in actual path
+ {"/blog", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ // TODO: Dynamic route - GET /blog/:blog_id - fill in actual path
+ {"/talk", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ {"/talk/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+ };
+
+ int count = sizeof(configs) / sizeof(configs[0]);
+ int result = Seobeo_Snapshots_Create_Batch(configs, count);
+
+ stop_test_server(server_pid);
+ return result;
+}
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/test/create_snapshots.c
--- a/mrjunejune/test/create_snapshots.c Fri Jan 09 07:19:09 2026 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-#include "seobeo/seobeo.h"
-#include "seobeo/snapshot_creator.h"
-#include
-#include
-#include
-#include
-#include
-
-#define TEST_PORT "6969"
-#define TEST_HOST "127.0.0.1"
-#define SNAPSHOT_DIR "mrjunejune/test/snapshots"
-
-// Start the server process
-static pid_t start_server(const char *server_binary)
-{
- pid_t server_pid = fork();
-
- if (server_pid < 0)
- {
- perror("fork");
- return -1;
- }
-
- if (server_pid == 0)
- {
- // Child process - run server
- printf("Starting server on port %s...\n", TEST_PORT);
- execl(server_binary, server_binary, NULL);
- perror("execl failed");
- exit(1);
- }
-
- // Parent - verify server started
- printf("Server started (PID: %d)\n", server_pid);
-
- usleep(100000);
- int status;
- pid_t result = waitpid(server_pid, &status, WNOHANG);
- if (result != 0)
- {
- if (WIFEXITED(status))
- {
- fprintf(stderr, "Server exited with code: %d\n", WEXITSTATUS(status));
- }
- else if (WIFSIGNALED(status))
- {
- fprintf(stderr, "Server killed by signal: %d\n", WTERMSIG(status));
- }
- return -1;
- }
-
- sleep(2);
- printf("Server ready\n\n");
-
- return server_pid;
-}
-
-// Stop the server process
-static void stop_server_test(pid_t server_pid)
-{
- if (server_pid > 0)
- {
- printf("\nStopping server (PID: %d)...\n", server_pid);
- kill(server_pid, SIGTERM);
- waitpid(server_pid, NULL, 0);
- printf("Server stopped\n");
- }
-}
-
-int main(int argc, char *argv[])
-{
- printf("=== Seobeo Snapshot Creator ===\n\n");
-
- // Get workspace directory (where the source files are)
- const char *workspace_dir = getenv("BUILD_WORKSPACE_DIRECTORY");
- if (!workspace_dir)
- {
- fprintf(stderr, "Error: BUILD_WORKSPACE_DIRECTORY not set\n");
- fprintf(stderr, "This binary must be run with 'bazel run'\n");
- return 1;
- }
-
- // Construct full path to snapshot directory
- char snapshot_path[1024];
- snprintf(snapshot_path, sizeof(snapshot_path), "%s/%s", workspace_dir, SNAPSHOT_DIR);
-
- // Get server binary path
- const char *server_binary = "./mrjunejune_server";
- if (argc > 1)
- {
- server_binary = argv[1];
- }
-
- printf("Workspace: %s\n", workspace_dir);
- printf("Server binary: %s\n", server_binary);
- printf("Snapshot directory: %s\n\n", snapshot_path);
-
- // Start server
- pid_t server_pid = start_server(server_binary);
- if (server_pid < 0)
- {
- fprintf(stderr, "Failed to start server\n");
- return 1;
- }
-
- // Define snapshots to create - paths that should succeed (200 OK)
- SnapshotConfig success_snapshots[] = {
- {"/", 200, snapshot_path, TEST_HOST, TEST_PORT},
- {"/resume", 200, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools", 200, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools/markdown_to_html", 200, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools/file_converter", 200, snapshot_path, TEST_HOST, TEST_PORT},
- };
- int num_success = sizeof(success_snapshots) / sizeof(success_snapshots[0]);
-
- // Define snapshots for redirect endpoints (301)
- SnapshotConfig redirect_snapshots[] = {
- {"/index.html", 301, snapshot_path, TEST_HOST, TEST_PORT},
- {"/resume/index.html", 301, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools/index.html", 301, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools/markdown_to_html/index.html", 301, snapshot_path, TEST_HOST, TEST_PORT},
- {"/tools/file_converter/index.html", 301, snapshot_path, TEST_HOST, TEST_PORT},
- };
- int num_redirects = sizeof(redirect_snapshots) / sizeof(redirect_snapshots[0]);
-
- SnapshotConfig error_snapshots[] = {
- {"/nonexistent", 404, snapshot_path, TEST_HOST, TEST_PORT},
- {"/does/not/exist", 404, snapshot_path, TEST_HOST, TEST_PORT},
- {"/missing.html", 404, snapshot_path, TEST_HOST, TEST_PORT},
- };
- int num_errors = sizeof(error_snapshots) / sizeof(error_snapshots[0]);
-
- int total_failed = 0;
- int total_passed = 0;
-
- // Create success snapshots
- printf("Creating snapshots for successful paths:\n\n");
- for (int i = 0; i < num_success; i++)
- {
- if (Seobeo_Snapshot_Create(&success_snapshots[i]) == 0)
- {
- total_passed++;
- }
- else
- {
- total_failed++;
- }
- }
-
- // Create redirect snapshots
- printf("\nCreating snapshots for redirect paths:\n\n");
- for (int i = 0; i < num_redirects; i++)
- {
- if (Seobeo_Snapshot_Create(&redirect_snapshots[i]) == 0)
- {
- total_passed++;
- }
- else
- {
- total_failed++;
- }
- }
-
- // Create error snapshots
- printf("\nCreating snapshots for error paths:\n\n");
- for (int i = 0; i < num_errors; i++)
- {
- if (Seobeo_Snapshot_Create(&error_snapshots[i]) == 0)
- {
- total_passed++;
- }
- else
- {
- total_failed++;
- }
- }
-
- // Stop server
- stop_server_test(server_pid);
-
- // Print summary
- printf("\n=== Summary ===\n");
- printf("Snapshots created: %d\n", total_passed);
- printf("Failed: %d\n", total_failed);
-
- if (total_failed == 0)
- {
- printf("\n✓ All snapshots created successfully!\n");
- printf("\nSnapshots saved to: %s/\n", snapshot_path);
- printf("\nRun tests to verify:\n");
- printf(" bazel test //mrjunejune:integration_test\n");
- return 0;
- }
- else
- {
- printf("\n✗ Some snapshots failed\n");
- return 1;
- }
-}
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/test/integration_test.c
--- a/mrjunejune/test/integration_test.c Fri Jan 09 07:19:09 2026 -0800
+++ b/mrjunejune/test/integration_test.c Fri Jan 09 07:42:04 2026 -0800
@@ -1,19 +1,4 @@
-#include "seobeo/seobeo.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define TEST_PORT "6969"
-#define TEST_HOST "127.0.0.1"
-#define MAX_RESPONSE_SIZE (1024 * 1024)
-#ifndef SNAPSHOT_DIR
- // TODO: Make it as current directory /snapshots...
- #define SNAPSHOT_DIR "mrjunejune/test/snapshots"
-#endif
+#include "mrjunejune/test/test.h"
// Test case structure
typedef struct {
@@ -25,6 +10,37 @@
size_t response_len;
} TestCase;
+void debug_diff(const char *expected, const char *actual)
+{
+ printf("\n--- DIFF (Expected vs Actual) ---\n");
+
+ // Create copies to use with strtok (strtok modifies the string)
+ char *exp_copy = strdup(expected);
+ char *act_copy = strdup(actual);
+
+ char *exp_line = strtok(exp_copy, "\n");
+ char *act_line = strtok(act_copy, "\n");
+
+ int line_num = 1;
+ while (exp_line != NULL || act_line != NULL) {
+ if (exp_line && act_line && strcmp(exp_line, act_line) == 0) {
+ // Lines match - optional: print nothing or a dot
+ } else {
+ printf("Line %d mismatch:\n", line_num);
+ printf(" EXP: [%s]\n", exp_line ? exp_line : "(end of string)");
+ printf(" ACT: [%s]\n", act_line ? act_line : "(end of string)");
+ printf(" -----------------------------------\n");
+ }
+
+ exp_line = strtok(NULL, "\n");
+ act_line = strtok(NULL, "\n");
+ line_num++;
+ }
+
+ free(exp_copy);
+ free(act_copy);
+}
+
// Helper: Convert URL path to filename
// "/" -> "root.snapshot"
// "/index.html" -> "index.html.snapshot"
@@ -117,274 +133,68 @@
return 0;
}
-// Helper: Create test client
-Seobeo_Handle* create_test_client()
-{
- Seobeo_Handle *client = Seobeo_Stream_Handle_Client_Create(TEST_HOST, TEST_PORT, FALSE);
- if (!client || client->socket < 0)
- {
- if (client)
- {
- Seobeo_Handle_Destroy(client);
- }
- return NULL;
- }
- return client;
-}
-
-// Helper: Generate default HTTP GET request
-int generate_http_get_request(char *buffer, size_t buffer_size, const char *path)
+int execute_test_case(TestCase *test, pid_t server_pid)
{
- return snprintf(
- buffer, buffer_size,
- "GET %s HTTP/1.1\r\n"
- "Host: %s\r\n"
- "Connection: close\r\n"
- "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"
- "User-Agent: SeobeoTestClient/1.0\r\n"
- "\r\n",
- path, TEST_HOST
- );
-}
-
-// Helper: Send HTTP request
-int send_http_request(Seobeo_Handle *client, const char *path, const char *custom_request)
-{
- char request_buffer[4096];
- int request_len;
-
- if (custom_request)
+ printf(" Testing: GET %s (expecting %d)\n", test->path, test->expected_status);
+
+ int32 max_url_length = 1024*3;
+ char *url = malloc(sizeof(char)*max_url_length);
+ snprintf(url, max_url_length, "%s%s", TEST_URL, test->path);
+ Seobeo_Client_Request *p_req = Seobeo_Client_Request_Create(url);
+ if (!p_req)
{
- request_len = snprintf(request_buffer, sizeof(request_buffer), "%s", custom_request);
- }
- else
- {
- request_len = generate_http_get_request(request_buffer, sizeof(request_buffer), path);
- }
-
- if (request_len < 0 || request_len >= sizeof(request_buffer))
- {
- fprintf(stderr, "Request buffer too small\n");
- return -1;
- }
-
- Seobeo_Handle_Queue(client, (uint8*)request_buffer, (uint32)request_len);
- return Seobeo_Handle_Flush(client);
-}
-
-// Helper: Read HTTP response
-int read_http_response(Seobeo_Handle *client, char **response_out, size_t *response_len_out)
-{
- char *response = malloc(MAX_RESPONSE_SIZE);
- if (!response)
- {
+ printf("Can't create requests");
return -1;
}
- size_t total_bytes = 0;
- int attempts = 0;
- const int max_attempts = 100;
-
- while (attempts++ < max_attempts && total_bytes < MAX_RESPONSE_SIZE - 1)
+ Seobeo_Client_Response *p_resp = Seobeo_Client_Request_Execute(p_req);
+ if (!p_resp)
{
- int bytes_read = Seobeo_Handle_Read(client);
-
- if (bytes_read > 0)
- {
- size_t to_copy = client->read_buffer_len;
- if (total_bytes + to_copy > MAX_RESPONSE_SIZE - 1)
- {
- to_copy = MAX_RESPONSE_SIZE - 1 - total_bytes;
- }
-
- memcpy(response + total_bytes, client->read_buffer, to_copy);
- total_bytes += to_copy;
- Seobeo_Handle_Consume(client, (uint32)to_copy);
- }
- else if (bytes_read == -2)
- {
- // Connection closed
- break;
- }
- else if (bytes_read == 0)
- {
- // Would block
- usleep(10000);
- continue;
- }
- else
- {
- free(response);
- return -1;
- }
- }
-
- response[total_bytes] = '\0';
- *response_out = response;
- *response_len_out = total_bytes;
-
- return (total_bytes > 0) ? 0 : -1;
-}
-
-// Helper: Parse HTTP status code
-int parse_http_status(const char *response)
-{
- if (!response || strlen(response) < 12)
- {
- return -1;
- }
-
- const char *status_start = strstr(response, "HTTP/1.1 ");
- if (!status_start)
- {
- status_start = strstr(response, "HTTP/1.0 ");
- }
-
- if (!status_start)
- {
+ printf("No response");
return -1;
}
- int status_code;
- if (sscanf(status_start + 9, "%d", &status_code) == 1)
+ if (p_resp->status_code != test->expected_status)
{
- return status_code;
- }
-
- return -1;
-}
-
-// Helper: Check if status is a redirect
-int is_redirect_status(int status)
-{
- return (status >= 300 && status < 400);
-}
-
-// Helper: Execute a test case
-int execute_test_case(TestCase *test, pid_t server_pid)
-{
- printf(" Testing: GET %s (expecting %d)\n", test->path, test->expected_status);
-
- Seobeo_Handle *client = create_test_client();
- if (!client)
- {
- printf(" ✗ Failed to create client connection\n");
- return -1;
- }
-
- if (send_http_request(client, test->path, NULL) < 0)
- {
- printf(" ✗ Failed to send request\n");
- Seobeo_Handle_Destroy(client);
+ printf(" ✗ Status mismatch: expected %d, got %d\n",
+ test->expected_status, p_resp->status_code);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- char *response = NULL;
- size_t response_len = 0;
- if (read_http_response(client, &response, &response_len) < 0)
- {
- printf(" ✗ Failed to read response\n");
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- test->actual_response = response;
- test->response_len = response_len;
+ printf(" ✓ Status code: %d\n", p_resp->status_code);
- int actual_status = parse_http_status(response);
- if (actual_status != test->expected_status)
- {
- printf(" ✗ Status mismatch: expected %d, got %d\n",
- test->expected_status, actual_status);
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- printf(" ✓ Status code: %d\n", actual_status);
-
- // For redirects, skip content comparison
- if (is_redirect_status(actual_status))
- {
- printf(" ⚠ Redirect status - skipping content comparison\n");
- Seobeo_Handle_Destroy(client);
- return 0;
- }
-
- // Only verify 200 OK responses against snapshots
- if (actual_status == 200)
+ if (p_resp->status_code == 200)
{
if (!test->expected_content)
{
printf(" ✗ No expected snapshot found: %s\n", test->expected_file_path);
printf(" → Run: bazel run //mrjunejune:create_snapshots\n");
- Seobeo_Handle_Destroy(client);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- if (strcmp(response, test->expected_content) != 0)
+ if (strcmp(p_resp->body, test->expected_content) != 0)
{
printf(" ✗ Response does not match expected snapshot\n");
printf(" Expected file: %s\n", test->expected_file_path);
- Seobeo_Handle_Destroy(client);
+ debug_diff(p_resp->body, test->expected_content);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- printf(" ✓ Response matches snapshot (%zu bytes)\n", response_len);
+ printf(" ✓ Response matches snapshot (%zu bytes)\n", p_resp->body_length);
}
- Seobeo_Handle_Destroy(client);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return 0;
}
-// Helper: Execute custom request test
-int execute_custom_request_test(const char *name, const char *custom_request,
- int expected_status, pid_t server_pid)
-{
- printf(" Testing: %s (expecting %d)\n", name, expected_status);
-
- Seobeo_Handle *client = create_test_client();
- if (!client)
- {
- printf(" ✗ Failed to create client connection\n");
- return -1;
- }
-
- if (send_http_request(client, NULL, custom_request) < 0)
- {
- printf(" ✗ Failed to send request\n");
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- char *response = NULL;
- size_t response_len = 0;
- if (read_http_response(client, &response, &response_len) < 0)
- {
- printf(" ✗ Failed to read response\n");
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- int actual_status = parse_http_status(response);
- if (actual_status != expected_status)
- {
- printf(" ✗ Status mismatch: expected %d, got %d\n",
- expected_status, actual_status);
- free(response);
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- printf(" ✓ Status code: %d\n", actual_status);
- printf(" ✓ Response received (%zu bytes)\n", response_len);
-
- free(response);
- Seobeo_Handle_Destroy(client);
- return 0;
-}
-
-// Helper: Send POST request with file data
-int send_post_file(Seobeo_Handle *client, const char *path, const char *file_data, size_t file_size)
+int send_post_file(Seobeo_Handle *p_req, const char *path, const char *file_data, size_t file_size)
{
char request_buffer[8192];
int header_len = snprintf(
@@ -405,7 +215,7 @@
}
// Send headers
- Seobeo_Handle_Queue(client, (uint8*)request_buffer, (uint32)header_len);
+ Seobeo_Handle_Queue(p_req, (uint8*)request_buffer, (uint32)header_len);
// Send file data in chunks if needed
size_t remaining = file_size;
@@ -413,15 +223,14 @@
while (remaining > 0)
{
size_t chunk_size = remaining > 4096 ? 4096 : remaining;
- Seobeo_Handle_Queue(client, (uint8*)ptr, (uint32)chunk_size);
+ Seobeo_Handle_Queue(p_req, (uint8*)ptr, (uint32)chunk_size);
ptr += chunk_size;
remaining -= chunk_size;
}
- return Seobeo_Handle_Flush(client);
+ return Seobeo_Handle_Flush(p_req);
}
-// Helper: Extract JSON field value from response body
char* extract_json_field(const char *json, const char *field, char *buffer, size_t buffer_size)
{
char search_pattern[256];
@@ -452,7 +261,6 @@
return buffer;
}
-// Helper: Test POST file conversion
int test_file_conversion(const char *endpoint, const char *test_file_path,
const char *expected_format, pid_t server_pid)
{
@@ -461,204 +269,64 @@
// Read test file
size_t file_size;
char *file_data = read_file(test_file_path, &file_size);
- if (!file_data)
- {
+ if (!file_data) {
printf(" ✗ Failed to read test file: %s\n", test_file_path);
return -1;
}
- printf(" → Loaded test file (%zu bytes)\n", file_size);
+ char url[1024];
+ snprintf(url, sizeof(url), "%s%s", TEST_URL, endpoint);
- // Create client and send request
- Seobeo_Handle *client = create_test_client();
- if (!client)
- {
- printf(" ✗ Failed to create client connection\n");
- free(file_data);
- return -1;
- }
+ Seobeo_Client_Request *p_req = Seobeo_Client_Request_Create(url);
+ Seobeo_Client_Request_Set_Method(p_req, "POST");
+ Seobeo_Client_Request_Set_Body(p_req, (uint8*)file_data, (uint32)file_size);
+ Seobeo_Client_Request_Add_Header_Array(p_req, "Content-Type: application/octet-stream");
- if (send_post_file(client, endpoint, file_data, file_size) < 0)
- {
- printf(" ✗ Failed to send POST request\n");
- free(file_data);
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
+ Seobeo_Client_Response *p_resp = Seobeo_Client_Request_Execute(p_req);
free(file_data);
- // Read response
- char *response = NULL;
- size_t response_len = 0;
- if (read_http_response(client, &response, &response_len) < 0)
- {
- printf(" ✗ Failed to read response\n");
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- Seobeo_Handle_Destroy(client);
-
- // Parse status
- int status = parse_http_status(response);
- if (status != 200)
- {
- printf(" ✗ Conversion failed with status: %d\n", status);
- printf(" Response: %s\n", response);
- free(response);
- return -1;
- }
-
- printf(" ✓ Status code: 200\n");
-
- // Extract download URL from JSON response
- const char *body = strstr(response, "\r\n\r\n");
- if (!body)
- {
- printf(" ✗ No response body found\n");
- free(response);
- return -1;
- }
- body += 4;
+ if (!p_resp || p_resp->status_code != 200) {
+ printf(" ✗ Conversion failed with status: %d\n", p_resp ? p_resp->status_code : 0);
+ if (p_resp) Seobeo_Client_Response_Destroy(p_resp);
- char download_url[512];
- if (!extract_json_field(body, "download_url", download_url, sizeof(download_url)))
- {
- printf(" ✗ Failed to extract download_url from response\n");
- printf(" Response body: %s\n", body);
- free(response);
- return -1;
- }
-
- printf(" ✓ Conversion succeeded\n");
- printf(" ✓ Download URL: %s\n", download_url);
- free(response);
-
- // Test downloading the converted file
- printf(" → Testing download: GET %s\n", download_url);
-
- client = create_test_client();
- if (!client)
- {
- printf(" ✗ Failed to create client for download\n");
- return -1;
- }
-
- if (send_http_request(client, download_url, NULL) < 0)
- {
- printf(" ✗ Failed to send download request\n");
- Seobeo_Handle_Destroy(client);
- return -1;
- }
-
- response = NULL;
- response_len = 0;
- if (read_http_response(client, &response, &response_len) < 0)
- {
- printf(" ✗ Failed to read download response\n");
- Seobeo_Handle_Destroy(client);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- Seobeo_Handle_Destroy(client);
-
- status = parse_http_status(response);
- if (status != 200)
- {
- printf(" ✗ Download failed with status: %d\n", status);
- free(response);
- return -1;
- }
-
- // Find body in download response
- body = strstr(response, "\r\n\r\n");
- if (!body)
- {
- printf(" ✗ No file data in download response\n");
- free(response);
- return -1;
- }
- body += 4;
-
- size_t downloaded_size = response_len - (body - response);
-
- // Verify content type in response headers
- const char *content_type = strstr(response, "Content-Type: ");
- if (!content_type)
- {
- printf(" ✗ No Content-Type header in download\n");
- free(response);
- return -1;
- }
-
- if (strstr(content_type, expected_format) == NULL)
- {
- printf(" ✗ Wrong content type (expected %s)\n", expected_format);
- free(response);
+ // Extract download URL from JSON body
+ char download_url_path[512];
+ if (!extract_json_field((char*)p_resp->body, "download_url", download_url_path, sizeof(download_url_path))) {
+ printf(" ✗ Failed to extract download_url\n");
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- printf(" ✓ Downloaded converted file (%zu bytes)\n", downloaded_size);
- printf(" ✓ Content-Type: %s\n", expected_format);
-
- free(response);
- return 0;
-}
+ printf(" ✓ Conversion succeeded. Download URL: %s\n", download_url_path);
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
-// Helper: Start test server
-pid_t start_test_server(const char *server_binary)
-{
- pid_t server_pid = fork();
+ printf(" → Testing download: GET %s\n", download_url_path);
+ char full_download_url[1024];
+ snprintf(full_download_url, sizeof(full_download_url), "%s%s", TEST_URL, download_url_path);
+
+ p_req = Seobeo_Client_Request_Create(full_download_url);
+ p_resp = Seobeo_Client_Request_Execute(p_req);
- if (server_pid < 0)
+ if (!p_resp || p_resp->status_code != 200)
{
- perror("fork");
+ printf(" ✗ Download failed\n");
+ if (p_resp) Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
return -1;
}
- if (server_pid == 0)
- {
- printf("Starting server on port %s...\n", TEST_PORT);
- execl(server_binary, server_binary, NULL);
- perror("execl failed");
- exit(1);
- }
-
- printf("Server started (PID: %d)\n", server_pid);
+ printf(" ✓ Downloaded converted file (%u bytes)\n", p_resp->body_length);
- usleep(100000);
- int status;
- pid_t result = waitpid(server_pid, &status, WNOHANG);
- if (result != 0)
- {
- if (WIFEXITED(status))
- {
- fprintf(stderr, "Server exited immediately with code: %d\n", WEXITSTATUS(status));
- }
- else if (WIFSIGNALED(status))
- {
- fprintf(stderr, "Server was killed by signal: %d\n", WTERMSIG(status));
- }
- return -1;
- }
-
- sleep(2);
- printf("Server ready\n\n");
-
- return server_pid;
-}
-
-// Helper: Stop test server
-void stop_test_server(pid_t server_pid)
-{
- if (server_pid > 0)
- {
- printf("\nStopping server (PID: %d)...\n", server_pid);
- kill(server_pid, SIGTERM);
- waitpid(server_pid, NULL, 0);
- printf("Server stopped\n");
- }
+ Seobeo_Client_Response_Destroy(p_resp);
+ Seobeo_Client_Request_Destroy(p_req);
+ return 0;
}
// Helper: Initialize test case with snapshot file
@@ -694,14 +362,12 @@
// Main integration test
int test_server_client_integration(const char *server_binary)
{
- printf("=== Server-Client Integration Test ===\n");
+ printf("=== Server-p_req Integration Test ===\n");
printf("MODE: Verifying Against Snapshots\n\n");
char cwd[1024];
if (getcwd(cwd, sizeof(cwd)) != NULL)
- {
printf("Working directory: %s\n", cwd);
- }
if (access(server_binary, X_OK) != 0)
{
@@ -714,24 +380,21 @@
pid_t server_pid = start_test_server(server_binary);
if (server_pid < 0)
- {
return -1;
- }
int failed_tests = 0;
int passed_tests = 0;
- // Define test cases - paths that should succeed (200 OK)
TestCase success_tests[] = {
{"/", 200, NULL, NULL, NULL, 0},
{"/resume", 200, NULL, NULL, NULL, 0},
{"/tools", 200, NULL, NULL, NULL, 0},
{"/tools/markdown_to_html", 200, NULL, NULL, NULL, 0},
{"/tools/file_converter", 200, NULL, NULL, NULL, 0},
+ {"/talk", 200, NULL, NULL, NULL, 0},
};
int num_success_tests = sizeof(success_tests) / sizeof(success_tests[0]);
- // Define test cases - paths that should redirect (301)
TestCase redirect_tests[] = {
{"/index.html", 301, NULL, NULL, NULL, 0},
{"/resume/index.html", 301, NULL, NULL, NULL, 0},
@@ -741,7 +404,6 @@
};
int num_redirect_tests = sizeof(redirect_tests) / sizeof(redirect_tests[0]);
- // Define test cases - paths that should fail (404)
TestCase failure_tests[] = {
{"/nonexistent", 404, NULL, NULL, NULL, 0},
{"/does/not/exist", 404, NULL, NULL, NULL, 0},
@@ -749,134 +411,73 @@
};
int num_failure_tests = sizeof(failure_tests) / sizeof(failure_tests[0]);
- // Initialize all test cases
for (int i = 0; i < num_success_tests; i++)
- {
init_test_case(&success_tests[i]);
- }
+
for (int i = 0; i < num_redirect_tests; i++)
- {
init_test_case(&redirect_tests[i]);
- }
+
for (int i = 0; i < num_failure_tests; i++)
- {
init_test_case(&failure_tests[i]);
- }
- // Run success tests
printf("Running tests for paths that should succeed:\n");
for (int i = 0; i < num_success_tests; i++)
{
if (execute_test_case(&success_tests[i], server_pid) == 0)
- {
passed_tests++;
- }
else
- {
failed_tests++;
- }
}
printf("\n");
- // Run redirect tests
printf("Running tests for paths that should redirect:\n");
for (int i = 0; i < num_redirect_tests; i++)
{
if (execute_test_case(&redirect_tests[i], server_pid) == 0)
- {
passed_tests++;
- }
else
- {
failed_tests++;
- }
- }
-
- printf("\n");
-
- // Run failure tests
- printf("Running tests for paths that should fail:\n");
- for (int i = 0; i < num_failure_tests; i++)
- {
- if (execute_test_case(&failure_tests[i], server_pid) == 0)
- {
- passed_tests++;
- }
- else
- {
- failed_tests++;
- }
}
printf("\n");
- // Test with custom request
- printf("Running tests with custom requests:\n");
- char custom_request[4096];
- snprintf(custom_request, sizeof(custom_request),
- "GET / HTTP/1.1\r\n"
- "Host: %s\r\n"
- "Connection: close\r\n"
- "X-Custom-Header: TestValue\r\n"
- "\r\n",
- TEST_HOST);
-
- if (execute_custom_request_test("Custom headers GET /", custom_request, 200, server_pid) == 0)
+ printf("Running tests for paths that should fail:\n");
+ for (int i = 0; i < num_failure_tests; i++)
{
- passed_tests++;
- }
- else
- {
- failed_tests++;
+ if (execute_test_case(&failure_tests[i], server_pid) == 0)
+ passed_tests++;
+ else
+ failed_tests++;
}
printf("\n");
- // Test POST endpoints
printf("Running tests for POST conversion endpoints:\n");
-
- // Test image-to-webp conversion
if (test_file_conversion("/api/convert/image-to-webp",
"mrjunejune/test/shiba.webp",
"image/webp",
server_pid) == 0)
- {
passed_tests++;
- }
else
- {
failed_tests++;
- }
printf("\n");
- // Test video-to-mp4 conversion
if (test_file_conversion("/api/convert/video-to-mp4",
"mrjunejune/test/test_avi.avi",
"video/mp4",
server_pid) == 0)
- {
passed_tests++;
- }
else
- {
failed_tests++;
- }
- // Cleanup test cases
for (int i = 0; i < num_success_tests; i++)
- {
cleanup_test_case(&success_tests[i]);
- }
for (int i = 0; i < num_redirect_tests; i++)
- {
cleanup_test_case(&redirect_tests[i]);
- }
for (int i = 0; i < num_failure_tests; i++)
- {
cleanup_test_case(&failure_tests[i]);
- }
stop_test_server(server_pid);
@@ -893,20 +494,14 @@
const char *server_binary = "./mrjunejune_server";
if (argc > 1)
- {
server_binary = argv[1];
- }
int result = test_server_client_integration(server_binary);
if (result == 0)
- {
printf("\n✓ All tests passed!\n");
- }
else
- {
printf("\n✗ Some tests failed\n");
- }
return result;
}
diff -r 3a564ffb2092 -r b230a743a01e mrjunejune/test/snapshots/blog.snapshot
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/test/snapshots/blog.snapshot Fri Jan 09 07:42:04 2026 -0800
@@ -0,0 +1,208 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Implements bazel structure for the company for TypeScript and JavaScript code base for hermiticity and stablishing standards for JavaScript and
-
-
- TypeScript testing and code structures.
-
-
- Led a team of five engineers in building GraphQL endpoints for client-facing applications using Apollo and AppSync, supporting over 2000 RPS and auto scaling depending on request values.
-
-
- Improved application response times by up to 85% for graphQL response by updating database schema and SQL queries, eliminating N+1 queries and lack of indexes.
-
-
- Developed CI/CD pipelines for backend structures.
-
-
- Designed infrastructure for pub/sub, caching, and media processing logic.
-
- Maintained Amazon amplify apps to create and deploy React web applications for companies such as NBA, Tinder, and other companies for COVID-19 at-home test kits.
-
- Implemented a script that helps accurately access and refund unused covid test kits; helping company save up to 200,000 USD.
-
- Created several Rails controllers for internal purposes; mocking end to end user experience for QA, mass refund features for CX department, and more, ultimately reducing support tickets amount by 50 percent.
-
- Implemented an audit table to help debug problems and logged which process was responsible for the change of the record using PaperTrail gems
- Constructed RESTful API endpoints in multiple different frameworks such as Django, Ruby on Rails, and Flask and automated API documentation process using swagger.
-
-
- Designed custom rake tasks for importing production data into newly updated data structure to meet client's needs.
-
-
- Maintained or updated staging/productions servers. Debugged problems in production postgres database using ssh and postgres console on Heroku or AWS servers
-
-
- Collaborated in creating automation python scripts for websites and application using selenium covering for QA eliminating 80% of QA's manual work
-
- Developed custom Shapley value regression model to calculate importance of independent variables of data sets using sklearn, pandas, and numpy.
-
-
- Created custom image uploader to Amazon s3 bucket using boto3 library.
-
-
- Built RESTful API application using Flask framework and automated extensive API documentation pages using flask-restplus, pytest, and swagger, covering 95% of the code base.
-
-
- Created an interactive graph using D3.js in Vue.js with data from Flask backend API.
-
- Implements bazel structure for the company for TypeScript and JavaScript code base for hermiticity and stablishing standards for JavaScript and
-
-
- TypeScript testing and code structures.
-
-
- Led a team of five engineers in building GraphQL endpoints for client-facing applications using Apollo and AppSync, supporting over 2000 RPS and auto scaling depending on request values.
-
-
- Improved application response times by up to 85% for graphQL response by updating database schema and SQL queries, eliminating N+1 queries and lack of indexes.
-
-
- Developed CI/CD pipelines for backend structures.
-
-
- Designed infrastructure for pub/sub, caching, and media processing logic.
-
- Maintained Amazon amplify apps to create and deploy React web applications for companies such as NBA, Tinder, and other companies for COVID-19 at-home test kits.
-
- Implemented a script that helps accurately access and refund unused covid test kits; helping company save up to 200,000 USD.
-
- Created several Rails controllers for internal purposes; mocking end to end user experience for QA, mass refund features for CX department, and more, ultimately reducing support tickets amount by 50 percent.
-
- Implemented an audit table to help debug problems and logged which process was responsible for the change of the record using PaperTrail gems
- Constructed RESTful API endpoints in multiple different frameworks such as Django, Ruby on Rails, and Flask and automated API documentation process using swagger.
-
-
- Designed custom rake tasks for importing production data into newly updated data structure to meet client's needs.
-
-
- Maintained or updated staging/productions servers. Debugged problems in production postgres database using ssh and postgres console on Heroku or AWS servers
-
-
- Collaborated in creating automation python scripts for websites and application using selenium covering for QA eliminating 80% of QA's manual work
-
- Developed custom Shapley value regression model to calculate importance of independent variables of data sets using sklearn, pandas, and numpy.
-
-
- Created custom image uploader to Amazon s3 bucket using boto3 library.
-
-
- Built RESTful API application using Flask framework and automated extensive API documentation pages using flask-restplus, pytest, and swagger, covering 95% of the code base.
-
-
- Created an interactive graph using D3.js in Vue.js with data from Flask backend API.
-
- Implements bazel structure for the company for TypeScript and JavaScript code base for hermiticity and stablishing standards for JavaScript and
-
-
- TypeScript testing and code structures.
-
-
- Led a team of five engineers in building GraphQL endpoints for client-facing applications using Apollo and AppSync, supporting over 2000 RPS and auto scaling depending on request values.
-
-
- Improved application response times by up to 85% for graphQL response by updating database schema and SQL queries, eliminating N+1 queries and lack of indexes.
-
-
- Developed CI/CD pipelines for backend structures.
-
-
- Designed infrastructure for pub/sub, caching, and media processing logic.
-
- Maintained Amazon amplify apps to create and deploy React web applications for companies such as NBA, Tinder, and other companies for COVID-19 at-home test kits.
-
- Implemented a script that helps accurately access and refund unused covid test kits; helping company save up to 200,000 USD.
-
- Created several Rails controllers for internal purposes; mocking end to end user experience for QA, mass refund features for CX department, and more, ultimately reducing support tickets amount by 50 percent.
-
- Implemented an audit table to help debug problems and logged which process was responsible for the change of the record using PaperTrail gems
- Constructed RESTful API endpoints in multiple different frameworks such as Django, Ruby on Rails, and Flask and automated API documentation process using swagger.
-
-
- Designed custom rake tasks for importing production data into newly updated data structure to meet client's needs.
-
-
- Maintained or updated staging/productions servers. Debugged problems in production postgres database using ssh and postgres console on Heroku or AWS servers
-
-
- Collaborated in creating automation python scripts for websites and application using selenium covering for QA eliminating 80% of QA's manual work
-
- Developed custom Shapley value regression model to calculate importance of independent variables of data sets using sklearn, pandas, and numpy.
-
-
- Created custom image uploader to Amazon s3 bucket using boto3 library.
-
-
- Built RESTful API application using Flask framework and automated extensive API documentation pages using flask-restplus, pytest, and swagger, covering 95% of the code base.
-
-
- Created an interactive graph using D3.js in Vue.js with data from Flask backend API.
-