Skip to content

jbeck018/nuco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neuco-App

Neuco-App is a Next.js application that provides AI-powered integrations with various business tools including Salesforce, HubSpot, Google, and Slack.

Features

  • Authentication: Secure authentication with email/password, magic links, and OAuth providers
  • Organizations: Multi-tenant architecture with role-based permissions
  • AI Chat: Advanced chat interface with streaming responses and function calling
  • Prompt Templates: Create, manage, and use reusable prompt templates
  • Slack Integration: Connect your Slack workspace and use the Neuco bot for AI chat and prompt templates
  • Integrations: Connect with Salesforce, HubSpot, and other business tools
  • Function Calling: Use AI to perform structured actions with external APIs
  • OAuth2 integrations with business platforms
  • Light and dark mode theming with shadcn/ui and Tailwind CSS
  • Extension framework for Slack, Chrome, and Salesforce
  • Subscription-based payment model with Stripe
  • Organization management with multi-tenancy support
  • Role-based access control for team collaboration

Tech Stack

  • Frontend: Next.js with App Router
  • Language: TypeScript (strict mode)
  • UI: Tailwind CSS with shadcn/ui components
  • Authentication: NextAuth.js
  • Database: PostgreSQL with Drizzle ORM
  • API Layer: tRPC for type-safe API endpoints
  • Package Manager: Bun
  • Deployment: Vercel
  • AI: Vercel AI SDK for LLM integrations
  • Payment: Stripe with startup discount program

Getting Started

Prerequisites

  • Node.js 18.x or higher
  • Bun package manager
  • PostgreSQL database

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/neuco-app.git
    cd neuco-app
  2. Install dependencies:

    bun install
  3. Set up environment variables:

    cp .env.example .env.local

    Then edit .env.local with your configuration values.

  4. Set up the database:

    bun db:push
  5. Run the development server:

    bun dev
  6. Open http://localhost:3000 in your browser.

Project Structure

neuco-app/
├── app/                  # Next.js App Router
│   ├── api/              # API routes
│   │   ├── auth/         # Authentication endpoints
│   │   ├── webhooks/     # Webhook handlers (Stripe, etc.)
│   │   └── integrations/ # Integration endpoints
│   ├── auth/             # Authentication pages
│   ├── dashboard/        # Dashboard pages
│   ├── org/              # Organization management
│   ├── integrations/     # Integration management
│   └── chat/             # AI chat interface
├── components/           # Reusable components
│   ├── auth/             # Authentication components
│   ├── dashboard/        # Dashboard components
│   ├── organizations/    # Organization components
│   └── ui/               # UI components
├── lib/                  # Utility functions and shared code
│   ├── auth/             # Authentication utilities
│   ├── db/               # Database configuration and schema
│   ├── trpc/             # tRPC router and procedures
│   ├── stripe/           # Stripe integration utilities
│   └── ai/               # AI utilities and providers
├── public/               # Static assets
└── styles/               # Global styles

Key Features

Authentication

See README-AUTH.md for detailed information on authentication setup and configuration.

Google OAuth

See README-GOOGLE-OAUTH.md for detailed instructions on setting up Google OAuth authentication.

AI Integration

See README-AI.md for detailed information on AI integration setup and configuration.

External Integrations

See README-INTEGRATIONS.md for detailed information on setting up external service integrations.

Stripe Integration

See README-STRIPE.md for detailed information on Stripe integration for subscription management.

The Stripe integration includes:

  • Organization subscription management
  • Multiple pricing tiers with different feature sets
  • Secure payment processing with Stripe Checkout
  • Self-service billing management with Stripe Customer Portal
  • Webhook handling for subscription lifecycle events
  • Automatic subscription status updates

Development Guidelines

  • Follow the Next.js documentation for best practices
  • Use TypeScript for all new code
  • Follow the component structure established in the project
  • Write tests for critical functionality
  • Use the shadcn/ui component library for UI elements

Testing

Authentication Testing

Running Tests

  • Run all tests: npm test
  • Run Google OAuth tests specifically: npx playwright test src/tests/auth/google-oauth.test.ts
  • Set up Google OAuth testing environment: ./scripts/setup-google-oauth-testing.sh

Deployment

The application is configured for deployment on Vercel:

vercel

For production deployment:

vercel --prod

Contributing

  1. Create a feature branch: git checkout -b feature/my-feature
  2. Commit your changes: git commit -m 'Add some feature'
  3. Push to the branch: git push origin feature/my-feature
  4. Submit a pull request

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages