Skip to content

Instantly share code, notes, and snippets.

Your goal is to generate a bsh script that fully automate the setup of a production-grade React + TypeScript application.

Make resonable assumptions wherever necessary.

The process is broken into below discrete steps. Before each step you must prompt the user:

“Step X/{TOTAL_STEPS}: – . Proceed? (y/n)”

If the user answers “y” or “yes”, execute exactly the commands needed for that step. If “n” or “no”, skip to the next step.

You are an experienced Senior Staff Engineer and an authority on GitHub Copilot for Visual Studio Code.

You stay continuously up to date with the official GitHub Copilot documentation and Github Copilot VS Code cheat sheets.

You help developers leverage the Copilot capabilities to produce efficient, maintainable high quality code.

You do this by helping the developers generate copilot prompts that are:

  • Clarifying the task and context: language, frameworks, file structure, and desired output.
  • Selecting the optimal Copilot interface/feature/syntax for a given task
  • Applying Copilot-friendly syntax

Temporal Challenge: Order Processing Workflow with SQL Database (Node.js + TypeScript)

Problem Statement

Implement an order processing workflow using Temporal and a SQL database (MySQL). The order goes through the following steps:

  1. Validate Order – Fetch order details from the SQL database and ensure they are complete (order has details required to start payment).
  2. Charge Payment – Simulate payment processing and update the database with payment status. If it fails, retry up to 3 times, with a 5-second delay between retries.
  3. Ship Order – If payment is successful, mark the order as shipped in the database. If all retries fail, mark it as canceled.

@shri-kanth
shri-kanth / Task.md
Created January 30, 2025 12:44
Task 4

TASK DESCRIPTION:

Create a Hotel Management System where users can register and log in as different roles (e.g., Manager, Front Desk Staff, Guest). The system should allow for managing room inventory, reservations, check-ins/check-outs, and generating overall booking and occupancy reports.

FRONTEND REQUIREMENTS:

1. React Project with TypeScript:

  • Initialize a React application with TypeScript and organize folders logically (e.g., pages, components, services).

2. Authentication and Role-Based Access:

@shri-kanth
shri-kanth / Task.md
Created January 29, 2025 05:16
Task 3

Task Description:

Create an application that allows users to manage a digital library of books. Users will be able to register, log in, manage their book collections, categorize them, track reading progress, and view reading activity reports. The application will include a RESTful API, a database schema, and a user interface.

Frontend Requirements:

  1. Set up a React project using TypeScript.
  2. Implement user authentication:
    • Develop registration and login pages where users can authenticate using an email and password.
  • Use JWT tokens to manage and secure endpoints.
@shri-kanth
shri-kanth / Task.md
Created January 24, 2025 10:23
Task 2

Task Description:

Build a simple event management application that allows users to create, update, and manage their events. The application will include features for user authentication, personalized event reminders, and viewing a personalized event calendar. This involves developing a RESTful API, a database schema, and a user interface.

Frontend Requirements:

  1. Set up a React project using TypeScript.
  2. Implement user authentication:
    • Design a registration and login page allowing users to authenticate using an email and password.
  • Use JWT to manage user sessions and secure endpoints.
@shri-kanth
shri-kanth / Task.md
Last active January 24, 2025 10:10
Task 1

Task Description:

Create a small application that allows authenticated users to manage a product inventory, log sales transactions, and generate basic sales reports. This involves developing a RESTful API, a database schema, and a user interface.

Frontend Requirements:

  1. Set up a React project using TypeScript.
  2. Implement user authentication:
    • Implement a login page allowing users to authenticate using a username and password.
  • Use tokens (e.g., JWT) to manage user sessions and secure endpoints.
@shri-kanth
shri-kanth / DevSetupDockerfile
Last active September 20, 2023 09:02
Docker file for development environment without any local installations
# Use the latest Ubuntu as the base image
FROM ubuntu:latest
# Update package lists and install necessary dependencies
RUN apt update -y
# Set the entry point to a simple sleep command to keep the container alive
CMD ["sleep", "infinity"]

Write a function which formats a duration, given as a number of seconds, in a human-friendly way.

The function must accept a non-negative integer. If it is zero, it just returns "now". Otherwise, the duration is expressed as a combination of years, days, hours, minutes and seconds.

Example :

* Input = 62, Output = "1 minute and 2 seconds"
* Input = 3662, Output = "1 hour, 1 minute and 2 seconds"