Uthman Oladele

Backend Engineer

Building backend systems, APIs, and developer tools. Focused on performance and clean architecture.

Portfolio

Selected Work

A collection of projects showcasing backend engineering, API design, and systems architecture.

01

Go-Git - Version Control System from Scratch

Go-Git - Version Control System from Scratch Go-Git is a Git implementation built from first principles in Go to understand how distributed version control actually works. No libraries for Git operations - just hash-based storage, tree structures, and commit graphs. View on GitHub → Why I Built This Most developers use Git daily without understanding how it works internally. I built this to learn version control from the ground up - content-addressable storage, tree building algorithms, and commit graph traversal. Core Features Content-Addressable Storage: Files stored by SHA-256 hash with automatic deduplication Staging Area: Git's three-tree architecture with index file Tree Objects: Nested directory structures as tree objects Commit History: Full commit chain with parent references Compression: zlib compression for all objects (blobs, trees, commits) Config Management: User name/email stored in .git/config Commands in Action Initialize Repository go-git init Creates the .git directory structure with objects, refs, and HEAD pointer. What happens: Sets up .git/objects/ for content storage, .git/refs/heads/ for branch pointers, and HEAD pointing to main branch. Configure User Identity go-git config Stores your name and email in .git/config for commit authorship. What happens: Prompts for user name and email, then writes them to .git/config in INI format. Every commit will include this information in the author field. View Commit History go-git log Displays commit history by traversing parent references. What happens: Reads commit hash from HEAD → refs/heads/main, loads commit object, displays info, follows parent pointer, repeats until no parent exists. Get Help go-git help Shows available commands and usage information. What happens: Displays CLI help menu with all available commands and their descriptions. Complete Command Reference go-git init # Initialize repository go-git config # Set user name and email go-git add <files> # Stage files (supports directories) go-git commit -m "message" # Create commit go-git log # View commit history How It Works Content-Addressable Storage Every object is stored by its SHA-256 hash at .git/objects/ab/c123... where the first 2 characters are the directory and the rest is the filename. Same content = same hash = automatic deduplication. Store the same file 100 times, uses disk space once. Tree Building (The Hard Part) Files are stored as blobs. Directories are stored as trees. Trees must be built bottom-up (deepest first) because parent trees need their children's hashes. This was the hardest part to implement - understanding why trees reference other trees by hash, not by content. Commits A commit is a pointer to a tree plus metadata (author, timestamp, message, parent). Commits form a directed acyclic graph where each commit references its parent, creating the history chain. Technical Implementation Object Format: <type> <size>\0<content> Tree Format: <mode> <filename>\0<binary-hash> (mode: 100644 for files, 040000 for dirs) Hash Storage: Binary bytes in tree objects, not hex strings (critical detail that took hours to debug). Note: .git/refs/heads/main stores hash as plain text hex string for simplicity Compression: zlib for all objects Branch Pointers: .git/refs/heads/main contains current commit hash Performance Deduplication: Identical files stored once Compression: ~60-70% size reduction with zlib Scalability: Linear time for add/commit operations Not optimized for speed (built for learning) but functional for small-to-medium repos. What I Learned Content-addressable storage is elegant: hash = address, automatic deduplication Trees are graphs, not nested structures: they reference by hash, not content Building bottom-up is necessary: can't hash parent without child hashes Binary formats are tricky: working with null bytes and binary hash data Compression matters: without zlib, .git/objects would be 3-4x larger Project Structure go-git/ ├── cmd/cmd.go # CLI with Cobra ├── internals/ │ ├── init.go # Repository initialization │ ├── config.go # User configuration │ ├── hash.go # SHA-256 + zlib compression │ ├── log.go # Commit history traversal │ ├── index/index.go # Staging area management │ └── objects/ │ ├── blobs.go # File content hashing │ ├── trees.go # Directory tree building │ └── commit.go # Commit object creation ├── install.sh # Installation script └── main.go # Entry point Installation git clone https://github.com/codetesla51/go-git.git cd go-git ./install.sh # Or build manually: go build -buildvcs=false -o go-git ln -s $(pwd)/go-git ~/.local/bin/go-git Limitations This is a learning project, not production software: No branches (only main branch) No merge operations No diff functionality No status command No remote operations (push/pull/fetch) No .gitignore support No packed objects (each object is separate file) No index optimization (linear scan) Why these limitations exist: This project focuses on Git's core - the object model, staging, and commits. Adding branches/merging/remotes would be another 2-3x the code and shift focus from fundamentals to features. Why This Matters Building Git from scratch reveals: Why commits are cheap (just pointers to trees) How deduplication works (content-addressable storage) Why branching is fast (just moving a pointer) What "detached HEAD" actually means How merge conflicts arise (competing tree references) The best way to understand a tool is to build it yourself. This project taught me more about Git in a week than years of using it did. Built With Go 1.25 - Core language Cobra - CLI framework fatih/color - Terminal colors Standard library only - All Git logic hand-written No Git libraries used. Everything from hashing to object storage is custom implementation. View Source Code on GitHub → Built by Uthman | @codetesla51 Learning project focused on understanding version control internals

GO
02

GO-CHAT - Concurrent Terminal Chat Server

GO-CHAT - Concurrent Terminal Chat Server GO-CHAT is a real-time terminal-based chat server built in Go. Features multiple chat rooms, AI assistant integration, private messaging, user profiles, TLS encryption, and rate limiting. Built to explore concurrent programming and network protocols. View on GitHub → Why I Built This I built GO-CHAT to understand concurrent programming, TCP networking, and real-time messaging systems from first principles. This project explores Go's goroutine model, connection management, and AI integration in a production-style chat system. Core Features Real-time Messaging: Instant message delivery using Go's concurrency model Multiple Lobbies: Create public or password-protected chat rooms AI Assistant: Integrated Gemini AI with context-aware responses Private Messaging: Direct messages and user tagging User Profiles: 50+ customizable emoji profile pictures Rate Limiting: IP-based connection limits and message throttling TLS/SSL Support: Optional encrypted connections Message History: Replay recent messages when joining lobbies Performance Concurrent Connections: Tested with 100+ simultaneous users Memory Usage: ~50MB baseline, ~10KB per connected client CPU Usage: Minimal under normal chat loads Message Throughput: Suitable for real-time conversation Note: Learning/hobby project suitable for small to medium deployments (teams, communities, personal use). Quick Start git clone https://github.com/codetesla51/go-chat-server cd go-chat go mod download go build -o go-chat main.go ./go-chat Connecting # Using netcat (simple) nc localhost 8080 # Using rlwrap (recommended - prevents message interruption) rlwrap nc localhost 8080 # Using TLS (if enabled) openssl s_client -connect localhost:8443 Key Commands /help Show all commands /lobbies List available chat rooms /create <name> [password] <desc> Create new lobby /join <name> [password] Join a lobby /users Show users in current lobby /sp <name> Set profile picture /msg <user> <message> Send private message /tag <user> <message> Tag someone in lobby /ai <question> Ask AI assistant /quit Disconnect Features Explained Lobbies (Chat Rooms) # Create public lobby /create gaming no-pass Discussion about video games # Create private lobby /create secret mypass123 Private discussion # Join lobby /join gaming /join secret mypass123 Each lobby maintains its own message history and can have custom AI personalities. AI Integration Context-aware AI assistant that remembers lobby conversation history: /ai What are goroutines in Go? Setup: Get API key from Google AI Studio, add to .env file: GEMINI_API_KEY="your-key-here" User Profiles /sp list View available profiles /sp robot Set profile picture /sp default Reset to default 50+ emoji options: cat, dog, robot, ninja, fire, star, and more. Private Messaging /msg bob Hey, want to join the coding lobby? /tag alice Check out this cool feature! Rate Limiting Connection Limits: Maximum 10 connections per IP Message Limits: Maximum 5 messages per 10-second window Architecture Project Structure go-chat/ ├── main.go Server entry point ├── server/ │ ├── server.go Core server logic │ ├── ai/ │ │ ├── client.go AI implementation │ │ └── prompts.go AI personalities │ ├── handlers/ │ │ ├── client_manager.go Connection management │ │ ├── lobby_manager.go Room management │ │ ├── commands.go Command processing │ │ └── messaging.go Message routing │ ├── middleware/ │ │ └── rate_limit.go Rate limiting │ └── utils/ │ ├── colors.go ANSI colors │ └── formatting.go Message formatting └── go.mod Connection Flow Client connects via TCP/TLS IP-based connection limit check Username selection and validation Client registered in ClientManager Placed in "general" lobby Recent message history sent Message loop begins Message Flow Client sends text Command check (starts with /) Rate limit validation Message stored in lobby history Broadcast to all lobby members Format with timestamp and profile Security Features TLS/SSL Support: Optional encrypted connections Password Protection: Hashed passwords for private lobbies Rate Limiting: Prevent spam and abuse Input Validation: Username and message sanitization Connection Limits: IP-based restrictions Enabling TLS openssl req -x509 -newkey rsa:4096 -keyout server.key \ -out server.crt -days 365 -nodes Place server.crt and server.key in project root and restart. What I Learned Building concurrent TCP servers with goroutines Managing client connections and state safely Implementing real-time message broadcasting Rate limiting and abuse prevention TLS/SSL integration in Go AI API integration with context management Terminal UI design with ANSI colors Graceful shutdown and cleanup Testing go test ./... go test -cover ./... go test ./server/middleware/ go test ./server/ai/ Configuration Environment Variables Create .env file: GEMINI_API_KEY="your-api-key" Server Ports TCP: Port 8080 (default) TLS: Port 8443 (when enabled) Example Session $ rlwrap nc localhost 8080 ██████╗ ██████╗ ██████╗██╗ ██╗ █████╗ ████████╗ ██╔════╝ ██╔═══██╗ ██╔════╝██║ ██║██╔══██╗╚══██╔══╝ ██║ ███╗██║ ██║█████╗██║ ███████║███████║ ██║ ██║ ██║██║ ██║╚════╝██║ ██╔══██║██╔══██║ ██║ ╚██████╔╝╚██████╔╝ ╚██████╗██║ ██║██║ ██║ ██║ ╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ Enter your username: alice [LOBBY] alice has joined the lobby > Hello everyone! [@_@] alice [just now] ╰-> Hello everyone! > /sp cat Profile picture changed to: (=^・^=) > /ai What are goroutines? [AI Response to alice] Goroutines are lightweight threads in Go... Limitations Learning project, not for massive scale No message persistence (in-memory only) No user authentication system Terminal-based only (no web interface) AI requires external API (Gemini) Built With golang.org/x/crypto: Password hashing and TLS godotenv: Environment variable management Google Gemini API: AI capabilities View Source Code on GitHub → Built by Uthman | @codetesla51

GO
03

Raw-HTTP - HTTP/1.1 Server Built from TCP Sockets

Raw-HTTP - HTTP/1.1 Server Built from TCP Sockets Raw-HTTP is a lightweight HTTP/1.1 server built entirely from raw TCP sockets in Go. No frameworks, no libraries - just socket programming and HTTP protocol implementation from scratch. Features path parameters, graceful shutdown, buffer pooling, and production-grade performance: 11,000+ RPS. View on GitHub → | Live Demo → Built With Raw-HTTP I built a URL shortener service using this server to prove it works in real applications: Snip - URL Shortener → The URL shortener demonstrates path parameters, static file serving, form handling, and production deployment - all running on raw TCP sockets. Why I Built This Most developers use frameworks like Express or Flask without understanding what happens underneath. I built this to learn HTTP at the protocol level - parsing requests from TCP sockets, managing connections, implementing TLS encryption, buffer pooling, graceful shutdown, and optimizing performance from first principles. Core Features Raw TCP Handling: Parses HTTP requests directly from socket connections Path Parameters: Dynamic routing with /users/:id syntax Query String Parsing: Automatic extraction of URL parameters Static File Serving: Proper MIME type detection and delivery Keep-Alive Support: HTTP/1.1 connection reuse for 2x performance Buffer Pooling: sync.Pool optimization reduces GC pressure Form & JSON Parsing: Handles both URL-encoded and JSON bodies Graceful Shutdown: Handles SIGINT/SIGTERM with connection draining Panic Recovery: Handler crashes don't take down the server HTTPS/TLS Support: Optional encrypted connections with certificate-based security Response Helpers: Built-in helpers for 201, 204, 400, 401, 403, 405, 429, 500, 502, 503 Custom 404 Pages: Serve custom HTML for not found routes Security Basics: Path traversal protection and request limits Installation As a dependency: go get github.com/codetesla51/raw-http@v1.0.1 Build from source: git clone https://github.com/codetesla51/raw-http.git cd raw-http go build -o server main.go ./server Quick Start package main import ( "log" "github.com/codetesla51/raw-http/server" ) func main() { srv := server.NewServer(":8080") srv.Register("GET", "/ping", func(req *server.Request) ([]byte, string) { return server.CreateResponseBytes("200", "text/plain", "OK", []byte("pong")) }) srv.Register("GET", "/users/:id", func(req *server.Request) ([]byte, string) { userID := req.PathParams["id"] return server.CreateResponseBytes("200", "text/plain", "OK", []byte("User: "+userID)) }) srv.Register("POST", "/api/data", func(req *server.Request) ([]byte, string) { name := req.Body["name"] if name == "" { return server.Serve400("name is required") } return server.Serve201("created: " + name) }) if err := srv.ListenAndServe(); err != nil { log.Fatal(err) } } Usage Examples curl http://localhost:8080/ping # Returns: pong curl http://localhost:8080/users/42 # Returns: User: 42 curl -X POST -d "name=john" http://localhost:8080/api/data # Returns: created: john curl https://localhost:8443/ping -k # HTTPS request (use -k to skip certificate verification) Advanced Features Path Parameters srv.Register("GET", "/users/:id", func(req *server.Request) ([]byte, string) { userID := req.PathParams["id"] // "123" from /users/123 return server.CreateResponseBytes("200", "text/plain", "OK", []byte(userID)) }) srv.Register("GET", "/posts/:postId/comments/:commentId", func(req *server.Request) ([]byte, string) { postID := req.PathParams["postId"] commentID := req.PathParams["commentId"] // ... }) Query Parameters srv.Register("GET", "/search", func(req *server.Request) ([]byte, string) { q := req.Query["q"] // /search?q=golang page := req.Query["page"] // /search?q=golang&page=2 // ... }) Configuration cfg := &server.Config{ ReadTimeout: 60 * time.Second, WriteTimeout: 30 * time.Second, MaxBodySize: 50 * 1024 * 1024, // 50MB EnableKeepAlive: true, EnableLogging: true, } srv := server.NewServerWithConfig(":8080", cfg) srv.Register("GET", "/ping", handler) srv.ListenAndServe() Response Helpers srv.Register("POST", "/login", func(req *server.Request) ([]byte, string) { if req.Body["password"] == "" { return server.Serve400("password required") } if !authenticate(req.Body["user"], req.Body["password"]) { return server.Serve401("invalid credentials") } return server.Serve201("logged in") }) Available helpers: Serve201, Serve204, Serve400, Serve401, Serve403, Serve405, Serve429, Serve500, Serve502, Serve503 HTTPS/TLS Support srv := server.NewServer(":8080") srv.EnableTLS(":8443", "server.crt", "server.key") srv.Register("GET", "/ping", handler) srv.ListenAndServe() // Serves HTTP on 8080 and HTTPS on 8443 Self-signed certificates included for development. For production, use Let's Encrypt: certbot certonly --standalone -d yourdomain.com cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem server.crt cp /etc/letsencrypt/live/yourdomain.com/privkey.pem server.key Performance Benchmarks Benchmarks on 8-core system: Scenario Concurrency Requests/sec Latency GET /ping 100 5,601 17.9ms GET /ping 500 11,042 45.3ms POST with body 100 5,773 17.3ms Key insights: HTTP/1.1 keep-alive nearly doubles throughput (5k → 11k RPS). Buffer pooling reduces GC overhead. Optimal concurrency range: 100-500 connections. Technical Implementation Buffer Pooling: Three sync.Pool instances (chunk, request, response buffers) reduce GC pressure TCP Connection Management: HTTP/1.1 keep-alive for connection reuse Custom HTTP Parser: Zero-dependency request parsing with chunked reading Graceful Shutdown: SIGINT/SIGTERM handling with 2-second grace period Panic Recovery: Per-connection panic handling prevents server crashes TLS/SSL Layer: Optional HTTPS encryption with goroutine-per-connection model Path Traversal Protection: Blocks directory traversal attacks on static files Goroutine-per-connection: Leverages Go's concurrency model MIME Detection: Comprehensive content-type handling Memory Efficient: Streams request bodies instead of full buffering Architecture ┌─────────────────────────────────────────────────────────────┐ │ Server Struct │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │ │ Router │ │ TLS Config │ │ Graceful Shutdown │ │ │ └──────┬──────┘ └─────────────┘ └─────────────────────┘ │ └─────────┼───────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────┐ │ Connection Handler │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │ │ Buffer Pool │ │ Request │ │ Keep-Alive Loop │ │ │ │ (sync.Pool)│ │ Parser │ │ │ │ │ └─────────────┘ └─────────────┘ └─────────────────────┘ │ └─────────────────────────────────────────────────────────────┘ Buffer Pooling Details Three sync.Pool instances reduce garbage collection pressure: Pool Buffer Size Purpose chunkBufferPool 4KB Reading from TCP connection requestBufferPool 8KB Accumulating request headers responseBufferPool Dynamic Building HTTP responses Buffers larger than 16KB are discarded to prevent memory bloat. Request Object Handlers receive *server.Request: Field Type Description Method string HTTP method (GET, POST, PUT, DELETE) Path string Request path without query string PathParams map[string]string URL parameters from route (:id) Query map[string]string Query string parameters Body map[string]string Parsed request body Headers map[string]string HTTP headers Browser string Detected browser name Project Structure raw-http/ ├── server/ │ ├── server.go Core HTTP server logic │ └── server_test.go Test suite (21 tests) ├── pages/ Static files and templates │ ├── index.html │ ├── 404.html Custom 404 page │ └── styles.css ├── server.crt Self-signed certificate ├── server.key Private key └── main.go Example application Testing go test ./server/... -v 21 tests cover HTTP parsing, route matching, path parameters, response formatting, error handling, and integration tests with real TCP connections. What I Learned How HTTP requests are structured at the protocol level TCP connection lifecycle and keep-alive mechanics Memory optimization with buffer pooling and sync.Pool Graceful shutdown patterns in Go (signal handling, connection draining) Panic recovery and error isolation in concurrent systems TLS/SSL encryption and certificate management Security considerations (DoS protection, path traversal, HTTPS) Go networking primitives and goroutine patterns The critical importance of connection reuse for performance How low-level implementation details impact throughput Limitations This is a learning project, not production software: Not production-tested (use for learning/small projects only) Single process (no clustering support) No middleware system (implement yourself if needed) No observability (no built-in metrics/tracing) ~5k connection ceiling (performance degrades at high concurrency) For production applications, use Go's net/http package. Why This Matters Most web development happens at the framework level. Building from TCP sockets up reveals what frameworks abstract away - HTTP parsing, connection management, buffer pooling, graceful shutdown, TLS encryption, and the networking fundamentals that determine performance. The journey from 250 RPS to 11,000+ RPS demonstrates how understanding these low-level details enables meaningful optimization. View Source Code on GitHub → Built by Uthman | @codetesla51

Go
04

GoLexer – High-Performance Go Lexical Analyzer

GoLexer - High-Performance Lexical Analyzer GoLexer is a production-ready lexical analyzer (tokenizer) for Go that transforms source code into structured tokens. Built for compilers, interpreters, DSLs, configuration parsers, and code analysis tools. View on GitHub → Why I Built This I built GoLexer to understand how compilers work at the lowest level. The challenge was supporting modern number formats, Unicode identifiers, and robust error recovery while keeping it fast and memory-efficient. This project taught me Go's string handling, rune management, and practical patterns for building developer tools. Core Features 50+ Token Types: Keywords, identifiers, numbers, strings, operators, punctuation Unicode Support: International identifiers (café, résumé, 变量) Number Formats: Decimal, hex, binary, octal, scientific notation Error Recovery: Detects errors while continuing tokenization JSON Configuration: Extend with custom keywords and operators Performance: Single-pass, low-memory, streaming or batch mode How It Works GoLexer reads source code character by character and converts it into structured tokens: Input: let total = 42 + 3.14 * count; Output: LET let (Line 1, Col 1) IDENT total (Line 1, Col 5) ASSIGN = (Line 1, Col 11) NUMBER 42 (Line 1, Col 13) PLUS + (Line 1, Col 16) NUMBER 3.14 (Line 1, Col 18) MULTIPLY * (Line 1, Col 23) IDENT count (Line 1, Col 25) SEMICOLON ; (Line 1, Col 30) Quick Start package main import ( "fmt" "github.com/codetesla51/golexer/golexer" ) func main() { source := `let total = 42 + 3.14 * count;` lexer := golexer.NewLexer(source) for { token := lexer.NextToken() if token.Type == golexer.EOF { break } fmt.Printf("%-12s %-10s (Line %d, Col %d)\n", token.Type, token.Literal, token.Line, token.Column) } } Batch Processing with Error Handling lexer := golexer.NewLexer(source) tokens, errors := lexer.TokenizeAll() fmt.Printf("Generated %d tokens\n", len(tokens)) if len(errors) > 0 { fmt.Printf("Found %d errors:\n", len(errors)) for _, err := range errors { fmt.Printf(" %s (Line %d, Col %d)\n", err.Message, err.Line, err.Column) } } Custom Configuration Extend GoLexer with custom keywords, operators, and punctuation using JSON: { "additionalKeywords": { "unless": "UNLESS", "async": "ASYNC" }, "additionalOperators": { "**": "POWER", "??": "NULL_COALESCE" } } lexer := golexer.NewLexerWithConfig(source, "config.json") Real-World Applications Compiler Frontend type Compiler struct { lexer *golexer.Lexer } func (c *Compiler) CompileFile(filename string) error { source, _ := os.ReadFile(filename) c.lexer = golexer.NewLexer(string(source)) tokens, errors := c.lexer.TokenizeAll() if len(errors) > 0 { return fmt.Errorf("lexical errors: %v", errors) } return c.parse(tokens) } Configuration Parser func ParseConfig(file string) (*Config, error) { content, _ := os.ReadFile(file) lexer := golexer.NewLexerWithConfig(string(content), "config.json") config := &Config{} for { tok := lexer.NextToken() if tok.Type == golexer.EOF { break } // Parse configuration syntax } return config, nil } Code Analysis func AnalyzeCode(source string) { lexer := golexer.NewLexer(source) tokens, errors := lexer.TokenizeAll() tokenCounts := make(map[golexer.TokenType]int) for _, token := range tokens { tokenCounts[token.Type]++ } fmt.Printf("Total tokens: %d\n", len(tokens)) fmt.Printf("Unique types: %d\n", len(tokenCounts)) fmt.Printf("Errors: %d\n", len(errors)) } Project Structure golexer/ ├── golexer/ Core lexer implementation ├── config/ JSON configuration templates ├── cmd/ CLI examples and tests ├── go.mod Go module definition └── LICENSE MIT License Testing & Validation Validated against 1700+ tokens, complex nested expressions, and edge cases. go test ./... go run cmd/main.go test.lang Technical Details Single-pass tokenization Low memory allocation Full UTF-8 support Streaming and batch modes Comprehensive error reporting View Source Code on GitHub → Built by Uthman | @codetesla51

Go
05

Axion – CLI math engine

Axion - High-Precision CLI Calculator Axion is a sophisticated, high-precision mathematical engine with advanced CLI interface, built in Go. Powered by the Cobra CLI framework, it offers a complete mathematical computing environment with expression parsing, scientific functions, unit conversions, variable management, and persistent calculation history. View on GitHub → Why Axion? Precision: Advanced mathematical expression parser with proper operator precedence Scientific: Complete scientific notation support and comprehensive function library Conversions: Built-in unit conversion across length, weight, and time categories Memory: Persistent calculation history and variable storage across sessions Performance: Optimized Go implementation with minimal memory footprint Modern CLI: Beautiful, color-coded interface powered by Cobra framework Reliability: Comprehensive error handling and 79.7% test coverage Extensible: Modular architecture for easy feature additions Core Features Mathematical Engine Expression Parsing: Advanced recursive descent parser with proper precedence Scientific Notation: Full support (2e-10, 3.14e+5, 1.5E-20) Operators: +, -, *, /, ^ (power), ! (factorial), mod() Parentheses Grouping: Complex nested expression support Implicit Multiplication: Automatic insertion (2sin(x) → 2 * sin(x)) Mathematical Functions Trigonometric: sin(), cos(), tan(), asin(), acos(), atan(), atan2() Logarithmic: ln(), log(), log10(), log2(), log(x, base) Exponential: exp(), pow(), sqrt() Utility: abs(), ceil(), floor(), round(), trunc(), sign() Statistical: mean(), median(), mode(), sum(), product() Comparison: max(), min() Variables & Constants Variable Assignment: x = 5, result = sin(30) + cos(60) Mathematical Constants: pi, e, phi, sqrt2, c (speed of light), G, h, R Persistent Storage: Variables maintained across calculator sessions Dynamic Updates: Real-time variable modification and retrieval Unit Conversion System Length: m, cm, mm, km, in, ft, yd, mi Weight: kg, g, mg, lb, oz, ton Time: s, ms, min, h, d Cross-Category Protection: Prevents invalid conversions Advanced Features Calculation History: JSON-based persistent storage with session continuity Precision Control: Configurable decimal precision (0-20 places) Interactive REPL: Beautiful color-coded command interface with help system Error Handling: Comprehensive error reporting with context Cross-Platform: Native support for Windows, macOS, and Linux Cobra Framework: Professional CLI with subcommands and flags Installation Quick Installation (Linux/macOS) # Clone the repository git clone https://github.com/codetesla51/Axion.git cd Axion # Run the installation script chmod +x install.sh ./install.sh # Reload your shell configuration source ~/.bashrc # or ~/.zshrc for Zsh users # Verify installation axion --help The install script will automatically: Build the Axion binary Create a symlink in ~/.local/bin/axion Detect your shell (bash/zsh) Add ~/.local/bin to your PATH if needed Manual Installation # Clone and run git clone https://github.com/codetesla51/Axion.git cd Axion # Install dependencies go mod download # Run directly go run main.go # Or build executable go build -o axion ./axion Go Install go install github.com/codetesla51/Axion@latest Usage Examples Getting Started axion A Powerful CLI Calculator Type 'help' for commands or 'exit' to quit » 2 + 3 * 4 Result: 14 » sin(30) + cos(60) Result: 1 » x = sqrt(16) Result: 4 » convert 100 cm to m 100 cm = 1 m Command Reference Command Syntax Example Expression <mathematical expression> 2 + 3 * sin(45) Assignment <variable> = <expression> x = 10 Conversion convert <value> <from> to <to> convert 5 km to mi History history history Variables variables or vars variables Precision precision <digits> precision 10 Clear clear or cls clear Help help help Exit exit or quit exit Basic Operations # Arithmetic with proper precedence » 15 + 25 * 2 - 10 / 5 Result: 63 # Scientific notation » 2e-10 + 3.5E+12 Result: 3500000000000 # Complex expressions with parentheses » ((10 + 5) * 2)^2 / 3 Result: 300 # Factorial operations » 10! / (5! * 2!) Result: 15120 Advanced Functions # Trigonometric calculations » sin(30) + cos(60) + tan(45) Result: 2 # Logarithmic functions » log(100) + ln(e) + log2(16) Result: 9.60517 # Custom base logarithm » log(8, 2) Result: 3 # Statistical functions » mean(10, 20, 30, 40, 50) Result: 30 » median(1, 3, 3, 6, 7, 8, 9) Result: 6 Variable Management # Variable assignment and usage » radius = 5 Result: 5 » area = pi * radius^2 Result: 78.5398 » circumference = 2 * pi * radius Result: 31.4159 # View all variables » variables ┌─ Stored Variables ───────────────────┐ │ radius = 5 │ area = 78.5398 │ circumference = 31.4159 └──────────────────────────────────────┘ # Use constants » speed_of_light = c Result: 299792458 Unit Conversions # Length conversions » convert 5280 ft to mi 5280 ft = 1 mi » convert 1000 mm to in 1000 mm = 39.3701 in # Weight conversions » convert 2.5 kg to lb 2.5 kg = 5.51156 lb # Time conversions » convert 90 min to h 90 min = 1.5 h Complex Calculations # Physics calculations » F = 9.8 * 75 # Force = mass * acceleration Result: 735 » E = F * 10 # Energy = force * distance Result: 7350 # Financial calculations » principal = 1000 Result: 1000 » rate = 0.05 Result: 0.05 » compoundInterest = principal * (1 + rate)^10 Result: 1628.89 # Engineering calculations » voltage = 12 Result: 12 » current = 2.5 Result: 2.5 » power = voltage * current Result: 30 Technical Implementation Expression Parser: Recursive descent parser with operator precedence Tokenizer: Lexical analysis with scientific notation support Variable System: In-memory map with JSON persistence History Engine: Timestamped calculation logging Conversion System: Type-safe unit conversion with validation CLI Framework: Cobra-powered command interface Error Recovery: Graceful error handling with helpful messages Project Structure Axion/ ├── cmd/ │ └── root.go CLI command definitions ├── pkg/ │ ├── calculator/ Core calculation engine │ ├── converter/ Unit conversion system │ ├── parser/ Expression parser │ └── history/ Calculation history ├── tests/ Comprehensive test suite ├── install.sh Installation script └── main.go Entry point Testing # Run all tests go test ./... # Run with coverage go test -cover ./... # Verbose output go test -v ./... Current test coverage: 79.7% Built With Go: High-performance compiled language Cobra: Professional CLI framework Color: Terminal color output library JSON: Data persistence format What I Learned Building a recursive descent parser from scratch Implementing operator precedence and associativity Designing type-safe unit conversion systems Creating interactive CLI applications with Cobra Managing persistent state across sessions Writing comprehensive test suites for mathematical software Handling floating-point precision edge cases Building modular, extensible software architecture Future Enhancements Matrix operations and linear algebra Calculus operations (derivatives, integrals) Complex number support Graph plotting capabilities More unit categories (temperature, pressure, volume) Custom function definitions Scripting support for batch calculations Contributing Contributions are welcome! Please feel free to submit issues or pull requests. View Source Code on GitHub → Built by Uthman | @codetesla51

Go
06

swift2FA - Secure Two factor authentication library

Swift2FA - Secure Two-Factor Authentication Library Swift2FA is a secure and easy-to-use PHP library for implementing two-factor authentication (2FA). It supports multiple authentication methods, ensuring a high level of security for web applications. Key Features Authenticator App Support: Works with Google Authenticator and other TOTP-based apps. Email Authentication: Uses SMTP with PHPMailer for secure email verification. SMS Authentication: Supports services like Twilio for sending 2FA codes via SMS. Built-in Encryption: Secret keys are encrypted before storage for maximum security. QR Code Generation: Generates QR codes for easy scanning and setup. Flexible Time-Step Settings: Adjustable settings for time-based authentication codes. Email and SMS Delivery Options: Multiple ways to send authentication codes securely. Why I Built Swift2FA I was exploring how 2FA works and wanted to build a PHP package that simplifies the implementation process. Swift2FA is open-source and currently has just 5 stars on GitHub 😂. It’s designed to be extremely easy to use. You can integrate 2FA with just a few lines of code: use Swift2FA\Swift2FA; $swift2fa = new Swift2FA(); How It Works Swift2FA follows a secure process to ensure authentication codes are generated and verified correctly: First, we generate a secret key. The secret key is encrypted before being stored. During authentication, the key is decrypted and used to generate a TOTP (Time-based One-Time Password). Libraries Used chillerlan\QRCode\{QRCode, QROptions} - For QR code generation. PHPMailer\PHPMailer\PHPMailer - For sending email authentication codes. PHPMailer\PHPMailer\Exception - Handles PHPMailer exceptions. Twilio\Exceptions\ConfigurationException - Handles Twilio configuration errors. Twilio\Rest\Client - Sends authentication codes via SMS. Repository & Testing You can check out the full source code on GitHub: Swift2FA GitHub Repository To ensure everything works perfectly, I created a full authentication system from scratch to test it: Auth System for Testing

Phpphpunit
07

Brevity - AI powered PDF summerizer

BREVITY - AI-Powered PDF Summarizer BREVITY is an AI-driven PDF summarization tool designed to help students and researchers summarize PDFs efficiently. Whether you need a short summary, a detailed research breakdown, objective questions, a fantasy version, or even a dumbed-down explanation, Brevity gives you full control over how your summaries are generated. 🔗 Live Demo: ai-brevity.vercel.app Why I Built This Project I built Brevity to explore AI-powered text processing and to help students (including myself) with quick and efficient PDF summarization. During my tests, I realized that different users have different needs when it comes to summarization, so I implemented multiple summary styles to fit various use cases. How Students Benefited Brevity helped many students by turning their study materials into summarized versions tailored to their needs. The objective question format was particularly useful for students preparing for Computer-Based Tests (CBT). My coursemates and I used it extensively during our school exams, making it easier to revise large amounts of content quickly. Reviews "Brevity helped me through my exams, and I use it in my everyday life." - Olamide (Course Mate) Features Custom Summarization Styles: Choose from multiple summary types including: Short summaries Detailed research breakdowns Objective questions Fantasy-style summaries Dumbed-down explanations Theme Selection: Users can personalize their experience with different themes. AI-Powered: Uses Google's Gemini AI for high-quality summary generation. Fast and Efficient: Summaries are generated quickly, making it ideal for students and researchers. Dashboard Preview Here’s what the dashboard looks like: Limitations Currently, Brevity does not support OCR (Optical Character Recognition), meaning it cannot process scanned PDFs or images containing text. However, I plan to add OCR support in future updates. How I Built Brevity The core implementation of Brevity was quite simple, thanks to existing libraries. However, I faced several challenges, especially with text encoding and character corruption. Libraries Used: FPDF - For handling PDF parsing and generation. Smalot\PdfParser\Parser - To extract text from PDFs. Carbon\Carbon - For handling date/time operations. voku\helper\UTF8 & ForceUTF8\Encoding - To fix UTF-8 encoding issues. Symfony\Component\String\UnicodeString - To handle string transformations. Fixing UTF-8 Encoding Issues Some characters were not displaying correctly after text extraction. To fix this, I implemented a character replacement hashmap: $replacements = [ "–" => "—", "â€" => "—", "\xe2\x80\x94" => "—", "â€" => "–", "\xe2\x80\x93" => "–", "“" => "\"", "â€" => "\"", "‘" => "'", "’" => "'", "…" => "…", "—" => "-", "–" => "-", "\"" => "\"", "―" => "'", "‘" => "'", "…" => "..." ]; This replaced corrupted characters with their correct versions, ensuring proper text formatting. Challenges Faced Text encoding issues (solved using UTF-8 normalization). Hosting problems due to server-side processing. Frontend design challenges while integrating multiple themes. Future Plans Add OCR support for scanned PDFs. Improve AI response accuracy for better summaries. Enhance UI with more customization options. If you're interested in checking out Brevity, try the live demo at ai-brevity.vercel.app.

Larvelsveltekitsuperbasegeneratetive ai