Skip to content

Instantly share code, notes, and snippets.

View paulweezydesign's full-sized avatar
🎯
Focusing

paulweezydesign

🎯
Focusing
View GitHub Profile

Create TanStack Start Project with shadcn/ui

Source: https://ui.shadcn.com/docs/installation/tanstack

Initialize a new TanStack Start project with Tailwind CSS and shadcn/ui add-ons pre-configured. This command sets up the project structure and installs necessary dependencies in one command.

npm create @tanstack/start@latest --tailwind --add-ons shadcn
from typing import Optional
from core.agents.architect import Architect
from core.agents.base import BaseAgent
from core.agents.bug_hunter import BugHunter
from core.agents.code_monkey import CodeMonkey
from core.agents.code_reviewer import CodeReviewer
from core.agents.developer import Developer
from core.agents.error_handler import ErrorHandler
from core.agents.executor import Executor
'use client'
import { LucideIcon } from 'lucide-react'
interface AgentCardProps {
agent: {
id: string
name: string
description: string
icon: LucideIcon
import { Agent } from '@mastra/core/agent'
import { nim, DEFAULT_MODEL } from '../nim-client'
export const projectManagerAgent = new Agent({
name: 'Project Manager',
instructions: `You are an expert Project Manager AI specializing in software development projects.
Your responsibilities include:
- Breaking down project requirements into actionable tasks
- Creating project timelines and milestones

Using Agents | Agents

Overview of agents in Mastra, detailing their capabilities and how they interact with tools, workflows, and external systems.

Source: https://mastra.ai/docs/agents/overview


Using Agents

@paulweezydesign
paulweezydesign / connect-db.ts
Created January 9, 2025 11:40
connect to mongodb with mongoose-nextjs
import _mongoose, { connect } from "mongoose";
declare global {
var mongoose: {
promise: ReturnType<typeof connect> | null;
conn: typeof _mongoose | null;
};
}
const MONGODB_URI = process.env.MONGODB_URI;
<button
onClick={toggleTheme}
className="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none"
aria-label="Toggle theme"
>
{theme === 'light' ? (
<Moon className="h-5 w-5 text-gray-700 dark:text-gray-300" />
) : (
<Sun className="h-5 w-5 text-gray-700 dark:text-gray-300" />
)}
import * as React from "react";
import clsx from "clsx";
export default function ToggleMessage() {
const [visible, setVisible] = React.useState(false);
const toggleVisibility = () => {
setVisible(!visible);
};
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { AuthProvider } from './components/AuthProvider';
import { ProtectedRoute } from './components/ProtectedRoute';
import { Login } from './components/Login';
import { Signup } from './components/Signup';
import { Dashboard } from './components/Dashboard';
function App() {
return (
import Realm from 'realm';
import { RealmApp } from './app';
const appConfig = {
id: 'your-app-id',
timeout: 10000,
};
const app = new RealmApp(appConfig);