what.lol Documentation and Blog

website·Indexed 31 days ago

https://what.lol

A collection of project documentation and personal blog posts. Includes technical documentation for whatecom (React frontend components), qli (a Go-based quiz application), and dashboard-tifco, alongside career reflections and professional principles.

Tokens
5.4K
Snippets
47
Records
65
Agent score
57%

What's inside what.lol

  1. Overview of StoryTEL TUI Game

    StoryTEL is a terminal-based interactive storytelling application built with Go. It implements a 'Choose Your Own Adventure' format using a Terminal User Interface (TUI). The application uses Bubble Tea for the UI framework and Lip Gloss for styling. It features a keyboard-driven interface (supporting arrow keys and vim-style j/k bindings) and automatically detects story files from a dedicated stories directory.
  2. Implement a URL shortener using http.Handler in Go

    The objective is to create an http.Handler that inspects the path of incoming web requests and redirects the user to a target URL based on a predefined mapping (e.g., redirecting /dogs to https://www.somesite.com/a-story-about-dogs).

    Implementation steps:

    1. Implement the stubbed methods in handler.go.
    2. Start by implementing the MapHandler function before moving to YAML parsing.
    3. Use the main/main.go file to test the implementation.
  3. Navigate the application routing and logic in the app directory

    The app directory contains the following functional areas:

    • dashboard: The primary application area. All pages except landing and login are nested here.
      • (overview): A group route for the root /dashboard page.
      • customers: The customers table page.
      • invoices: Routes for viewing, creating, and editing invoices.
    • lib: Utility functions, type definitions, and test data. Query logic is primarily located in actions.ts.
    • login: Logic for the login page.
    • seed: A dedicated route used to populate the database with initial placeholder data.
    • ui: UI primitives, styling, fonts, and domain-specific components (e.g., customers, dashboard, and invoices components including the pagination component).
  4. GGOB Technology Stack Overview

    GGOB is built using the following technologies:

    • Next.js: React framework for server-rendered apps
    • React: Component-based UI library
    • Prisma: Database toolkit and ORM
    • Tailwind CSS: Utility-first CSS framework
    • Node.js: JavaScript runtime
    • Vercel: Deployment platform
    • ESLint: Code linting utility
  5. Understand the project directory structure

    The project follows a Next.js App Router architecture where the app directory serves as the primary source for application logic, routing, and server components. Routing is determined by folder names and layouts.

    Key directories include:

    • ~: Project configuration files and authentication logic.
    • app: Main application code (equivalent to src).
    • public: Static assets such as images.
    • readme: Documentation screenshots.
  6. Quiz application architecture overview

    The quiz application is a single-file Go program that implements a command-line quiz game. It features CSV-based question loading, a configurable time limit, and optional question shuffling. The application uses a concurrent model to handle user input and timer expiration simultaneously without blocking.
  7. Run tests for qli development

    Developers can verify the application's functionality by running the built-in Go test suite.
    go test
  8. Install and run StoryTEL

    StoryTEL is a terminal-based interactive story application. To use it, build the binary from the source and execute it from the terminal.
    # Build the application
    go build -o storytel ./cmd/storytel
    
    # Run the application
    ./storytel
  9. Install and run TifCo dashboard locally

    To set up the TifCo dashboard on your local machine, clone the repository, install the required dependencies using pnpm, and then either start the development server or create a production build to run locally.
    # 1. Clone the repository
    git clone https://github.com/Nostromos/TifCo.git
    
    # 2. Install dependencies
    pnpm install
    
    # 3. Run the development build
    pnpm dev
    
    # OR: Get a production build and run it locally
    pnpm build && pnpm start
  10. Build and deploy GGOB for production

    Prepare the GGOB project for production by running the build script, then start the production server.
    npm run build
    npm start
  11. Enhance Go Quiz CLI with string cleanup and shuffling

    Improve the quiz experience by implementing the following bonus features:

    1. Input Normalization: Use the strings package to trim whitespace and normalize capitalization of user answers to prevent false negatives.
    2. Randomization: Add a CLI flag to shuffle the order of questions each time the quiz is run.
  12. Implement a CSV-based Quiz CLI in Go (Part 1)

    Create a CLI program that reads a quiz from a CSV file and tracks the user's score. The program must support a user-provided CSV path via a flag, defaulting to problems.csv. The CSV format consists of two columns: the question and the answer. The program should iterate through all questions (up to 100), accept single-word/number answers, and output the total number of correct answers versus the total number of questions at the end. Use the standard Go encoding/csv package to handle potential commas within questions.
    5+5,10
    7+3,10
    "what 2+2, sir?",4