Skip to content

Instantly share code, notes, and snippets.

View itsatman's full-sized avatar

itsatman

  • Joined Oct 24, 2025
View GitHub Profile
@itsatman
itsatman / clean-code.mdc
Created November 1, 2025 08:23 — forked from mfaiz0591/clean-code.mdc
Cursor Rules For Clean Code
---
description: Clean Code Guidelines. Guidelines for writing clean, maintainable, and human-readable code. Apply these rules when writing or reviewing code to ensure consistency and quality
globs:
---
# Clean Code Guidelines
## Constants Over Magic Numbers
- Replace hard-coded values with named constants
- Use descriptive constant names that explain the value's purpose
@itsatman
itsatman / git-workflow.mdc
Created November 1, 2025 08:22 — forked from mfaiz0591/git-workflow.mdc
Cursor Rules For Git Workflow
---
description: Git Workflow Guidelines. Apply these rules when performing git operations
globs:
---
# Git Workflow Guidelines
## Main Branches
### Main (or Master)
@itsatman
itsatman / convex-review.yml
Created November 1, 2025 08:08 — forked from victorpatru/convex-review.yml
Convex Review using Cursor's CLI in headless mode
name: Convex Reviewer
on:
issue_comment:
types: [created]
concurrency:
group: convex-reviewer-${{ github.event.issue.number }}
cancel-in-progress: true
@itsatman
itsatman / GoogleOneTap.tsx
Created November 1, 2025 08:06 — forked from lifeiyu071/GoogleOneTap.tsx
Convex Auth + Google One Tap
"use client";
import envClient from "@/env/client";
import { useAuthActions, useAuthToken } from "@convex-dev/auth/react";
import Script from "next/script";
import { useEffect, useRef, useState } from "react";
export default function GoogleOneTap() {
const { signIn } = useAuthActions();
const userToken = useAuthToken();
@itsatman
itsatman / patterns.mdc
Created November 1, 2025 08:04 — forked from rebers/patterns.mdc
Must-follow patterns for Convex mutations, queries, and usage of `api.` or `internal.`
---
description: Must-follow patterns for Convex mutations, queries, and usage of `api.` or `internal.`
alwaysApply: false
---
# Convex API Reference Patterns
## Overview
To avoid TypeScript deep instantiation errors (TS2589) when working with Convex's generated API objects, we use lightweight function references created with `makeFunctionReference` instead of importing `api` or `internal` from `convex/_generated/api`.
@itsatman
itsatman / sync-convex-env.ts
Created November 1, 2025 07:53 — forked from RodPaDev/sync-convex-env.ts
Syncs convex environment with .env.local
import { parse } from 'dotenv';
import { readFile } from 'fs/promises';
import { watch } from "fs";
const ENV_FILE = '.env.local';
console.log(`Watching for changes in ${ENV_FILE}...`);
const watcher = watch(ENV_FILE, (event, filename) => {
if (event === 'change') {
@itsatman
itsatman / convex_instructions.md
Created November 1, 2025 07:53 — forked from mikecann/convex_instructions.md
Convex instructions
---
description: Guidelines for performing data migrations on convex
globs: convex/**
alwaysApply: false
---
Data migrations are really easy on Convex.
# Adding a new field
Here's the general flow for adding a new field. Let's say we have a messages table
```ts
// convex/schema.ts
@itsatman
itsatman / opinonated_openai_convex_rules.mdc
Created November 1, 2025 07:10 — forked from srizvi/opinonated_openai_convex_rules.mdc
Opinionated guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples
# Convex guidelines
## Function guidelines
### New function syntax
- ALWAYS use the new function syntax for Convex functions. For example:
```ts
import { query } from "./_generated/server";