Skip to content

baixianger/Rice

Repository files navigation

Rice

This is a learning project

Tech Stack

1. Next.js

2. React with Shadcn UI and Tailwind CSS

3. Prisma with Neon

4. tRPC with TanStack React Query in Next.js

5. Inngest, an event-driven durable execution platform

6. E2B sandbox

7. AGENT TOOLS

  • Add tools to agent
    • "terminal" - How to run commands in E2B sandbox: E2B commands
    • "createOrUpdateFiles"
    • "readFiles"
  • Add a new prompt
  • Add agent network & routers

8. Messages

  • Create Message schema
  • Create Fragment schema
  • Save user input prompt as message
  • Save Agent response as message & fragment

9. Projects

  • Create Project schema
  • Add Message relations
  • Create new project on user prompt
  • Preserve projectId in background jobs
  • Add project page use useRouter

10. Messages UI

  • Create Project View
  • Create Messages Container
    • Create Message Card
    • Create Message Form
  • Modify Messages getMany Procedure

11. Project Header

  • Create Project Header
  • Add Fragment selection
  • Add Loading state

12. Fragment View

  • Create Fragment View

13. Code View

  • Create Tabs in Project View

  • Create File Explorer

    • Create File Explorer
    • Create Tree View
    • Create File path Breadcrumbs
    1. Home Page
    • Create Home Page
    • Create Projects List
    • Create Project Form
    1. Theme
    • Pick and apply new theme
    1. Authentication
    • Create a Clerk account
    • Setup Clerk
      • Update .env
      • Add ClerkProvider
      • Add Sign in and Sign up screns
      • Add middleware
    • Create home layout Navbar
    • Create User Control component
    • Create protected tRPC procedures
    • Update Prisma Schema
    1. Billing
    • Enable Clerk billing ref
    • Create billing page
    • Add Rate Limiting node-rate-limiter-flexible
      • Update prisma schema
      • Create usage utils, i.e. getUsageTracker, consumeCredits, refundCredits
    • Create Usage Component
    • Update tRPC procedures to get usage status
    • Improve the usage design by using a tRPC middleware to check credits before each procedure
    1. Agent Memory
    • Add previous messages context
    • Add fragment title generation
    • Add response message generation
    1. Bug Fixes
    1. Deployment
    • Local deployment test npm run build && npm run start
    • Deploy to Vercel
    • Bypassing deployment protection ref

other dependencies include:

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

An AI SaaS platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages