Skip to content

CivicConnect: a chatbot platform for Congressional offices

License

Notifications You must be signed in to change notification settings

ninest/civic-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

50 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Civic Connect

A platform to create chatbots for constituent engagement

Features

  • ๐Ÿ“„ Documents: upload documents to give GPT more context
  • ๐Ÿ–Š๏ธ Forms: collect user data seamlessly through natural, conversational forms
  • ๐Ÿ’ฌ Slack integration: get notified when forms are submitted
  • ๐Ÿ“Š Analytics: access insights on chatbot usage and user engagement

User chat

ย 

Admin dashboard

Admin dashboard

View more images (documents uploading, forms, analytics, chatbot demo)

Uploading documents to provide context and knowledge in answering questions:

uploading documents

Forms for collecting information from users:

forms

Form submissions page:

form submissions

Chatbot demo for admins to test form submissions and other features:

chatbot demo

Conversations table:

conversations view

Analytics page showing total number of conversations and breakdown by conversation category:

analytics view

Integrations page:

integrations

View videos

Development

This projects requires

After cloning the repository, run

pnpm i 

Create a .env file with the following:

DATABASE_URL=postgres://user:password@localhost:2430/civicconnect_db
OPENAI_API_KEY=

The database URL postgres://user:password@localhost:2430/civicconnect_db is the local development database created in a Docker volume.

Create an OpenAI API key at platform.openai.com/api-keys.

To setup the local database and add seed data, run

pnpm db:reset  # warning: this will delete all data in the local database

This commands runs

  • pnpm db:down: deletes the database
  • pnpm db:up: sets up the database
  • pnpm db:seed: runs the seed script to populate the database with sample data

To start the development server, run

pnpm dev

Libraries

  • Nextjs: make sure you are looking at the docs for the "App Router"
  • LangChain: we're using the JS library
  • Prisma: see prisma/schema.prisma for the Postgres DB schema
  • TailwindCSS
  • ShadcnUI: this UI library takes care of a lot of the difficult stuff for us, like complex components (dropdowns, autocomplete, etc) and accessibility

Contact

If you have any questions about the project, please contact Parth Kabra ([email protected]).

Videos

The videos are for a chatbot "Moulton Bot" created for Congressman Seth Moulton's office.

User chat

chat.mp4

Bot editing

new.mp4

Uploading documents

docs-uploading.mp4

Form editing

form-editing.mp4

Form submissions

form-submission.1.mp4

Analytics

analytics.mp4

Other

Credits

Group members:

  • Alaโ€™a Tamam
  • Isha Chadalavada
  • Rohit Kaushik
  • Parth Kabra
  • Arjun Bhat

Under the advisement of Prof. Beth Noveck, Prof. Dan Jackson, Marci Harris and the PopVox foundation.