My Stack

Kavikumar M

Here’s where I’m currently most productive, based on my projects, internships, and hackathon wins:

1. Framework (Next.js and React)

I’ve been deep into Next.js and ReactJS since my internships and hackathon projects, starting around 2023. I lean heavily on TypeScript for all my work to keep things robust and scalable.

For data fetching, I stick to modern patterns:

Majority: Server Components

I fetch data in Server Components whenever possible—like in my Agrefast project for DocuSign. It’s clean and efficient. For legacy codebases, I might still use client-side libraries like swr.

export default async function Page() {
  let data = await fetch('https://api.docusign.com/contracts')
  let contracts = await data.json()
  return (
    <ul>
      {contracts.map((contract) => (
        <li key={contract.id}>{contract.title}</li>
      ))}
    </ul>
  )
}
Sometimes: Context + Promises

For projects like Haven, I’ve used Context to manage global state with Promises, especially when dealing with encrypted SOS messages across components.

import { createContext, useContext } from 'react'

const SOSContext = createContext(null)

export function SOSProvider({ children }) {
  let sosPromise = fetch('https://api.haven.org/sos').then(res => res.json())
  return (
    <SOSContext.Provider value={{ sosPromise }}>
      {children}
    </SOSContext.Provider>
  )
}

export function useSOSContext() {
  let context = useContext(SOSContext)
  if (!context) throw new Error('useSOSContext must be used within SOSProvider')
  return context
}

Then, I’d unwrap it in a client component:

'use client'

import { use } from 'react'
import { useSOSContext } from 'app/context'

export function SOSDisplay() {
  let { sosPromise } = useSOSContext()
  let messages = use(sosPromise)
  return (
    <ul>
      {messages.map(msg => (
        <li key={msg.id}>{msg.text}</li>
      ))}
    </ul>
  )
}

For forms, I’ve used Server Actions in Next.js (e.g., Tantrotsav registration flows) and validate with libraries like Zod when needed.

2. DevOps (AWS, Docker, Jenkins)

I’m big on AWS, Docker, and CI/CD pipelines—skills I honed at Reslink and Samagra. I automate deployments with Jenkins and monitor with Prometheus/Grafana.

Why Docker?

Docker’s been a game-changer for me—like slashing deployment time by 62% at Reslink. It ensures consistency across environments and pairs perfectly with AWS Lambda or ECS for scalability.

docker build -t app:latest .
docker run -p 3000:3000 app:latest

I also use it with Terraform for infra-as-code when spinning up resources.

3. Backend (Node.js, Flask, MongoDB, PostgreSQL)

I toggle between Node.js (e.g., Tantrotsav) and Flask (e.g., Haven) depending on the project. For databases, I’m split between MongoDB (love Atlas Vector Search for similarity matching) and PostgreSQL (great for structured data).

Here’s a quick Node.js API I’d write:

const express = require('express');
const app = express();

app.get('/api/users', async (req, res) => {
  const users = await db.collection('users').find().toArray();
  res.json(users);
});

app.listen(3000, () => console.log('Running on 3000'));

4. AI Integration (OpenAI, Vercel AI SDK)

I’ve integrated OpenAI into projects like Agrefast for obligation extraction and Haven for legal query bots. The Vercel AI SDK made Chat-UI a breeze at Samagra.

Example from Agrefast:

import { OpenAI } from 'openai';

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

async function extractObligations(contractText) {
  const response = await openai.chat.completions.create({
    model: 'gpt-4',
    messages: [{ role: 'user', content: `Extract obligations from: ${contractText}` }],
  });
  return response.choices[0].message.content;
}

5. Coding Patterns

This stack’s powered my wins — like 1st at the DocuSign Hackathon — and keeps me shipping fast and reliable code.