Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninest/civic-connect
CivicConnect: a chatbot platform for Congressional offices
https://github.com/ninest/civic-connect
chatbot gpt gpt-4 nextjs northeastern-university openai react
Last synced: 2 months ago
JSON representation
CivicConnect: a chatbot platform for Congressional offices
- Host: GitHub
- URL: https://github.com/ninest/civic-connect
- Owner: ninest
- License: gpl-3.0
- Created: 2023-11-11T04:47:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-06T23:13:46.000Z (about 1 year ago)
- Last Synced: 2024-05-19T03:48:23.568Z (8 months ago)
- Topics: chatbot, gpt, gpt-4, nextjs, northeastern-university, openai, react
- Language: TypeScript
- Homepage:
- Size: 80.5 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](./assets/2023-12/edit-bot.png)
View more images (documents uploading, forms, analytics, chatbot demo)
Uploading documents to provide context and knowledge in answering questions:
![uploading documents](./assets/2023-12/documents.png)
Forms for collecting information from users:
![forms](./assets/2023-12/forms.png)
Form submissions page:
![form submissions](./assets/2023-12/form-submissions.png)
Chatbot demo for admins to test form submissions and other features:
![chatbot demo](./assets/2023-12/admin-chat-demo.png)
Conversations table:
![conversations view](./assets/2023-12/conversations.png)
Analytics page showing total number of conversations and breakdown by conversation category:
![analytics view](./assets/2023-12/analytics.png)
Integrations page:
![integrations](./assets/2023-12/integrations.png)
[View videos](#Videos)
## Development
This projects requires
- Node v18+
- [pnpm](https://pnpm.io/): Please follow the [pnpm installation guide](https://pnpm.io/installation) to install it
- DockerAfter cloning the repository, run
```
pnpm i
```Create a `.env` file with the following:
```env
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](https://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 dataTo start the development server, run
```
pnpm dev
```### Libraries
- [Nextjs](https://nextjs.org/docs): make sure you are looking at the docs for the "App Router"
- [LangChain](https://www.langchain.com/): we're using the JS library
- [LangChain Prisma integration](https://js.langchain.com/docs/integrations/vectorstores/prisma)
- [Prisma](https://www.prisma.io/): see `prisma/schema.prisma` for the Postgres DB schema
- [TailwindCSS](https://tailwindcss.com/)
- [ShadcnUI](https://ui.shadcn.com/): 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](https://moulton.house.gov/).
### User chat
https://github.com/ninest/civic-connect/assets/34677361/53578f39-8422-4e84-ae24-0dd6062f8b48
### Bot editing
https://github.com/ninest/civic-connect/assets/34677361/097c02ed-b200-4924-9d6c-1c9804dbfbc5
### Uploading documents
https://github.com/ninest/civic-connect/assets/34677361/7da5484e-4499-4536-84de-3cf0045b126e
### Form editing
https://github.com/ninest/civic-connect/assets/34677361/333c8773-5ef0-45c5-9e94-044b149f985e
### Form submissions
https://github.com/ninest/civic-connect/assets/34677361/3780371b-a39a-4ad9-8618-2ce66f450629
### Analytics
https://github.com/ninest/civic-connect/assets/34677361/27e3bf49-cffe-4088-8bed-e7dde1d6666a
## Other
- [Project pitch deck](https://www.canva.com/design/DAF0BkKEiFg/nFoOQEfieefQ8_63sd_t6w/edit?utm_content=DAF0BkKEiFg&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton)
- [Slack group](https://join.slack.com/t/congressai4impact/shared_invite/zt-2882nx1ba-DYy_rxYa8_v3GXlkEiUNgw)
- [Project plan document](https://docs.google.com/document/d/1typXe2OvmMHH_WBoVODv8UXTgLfBNDYXhAbyv6pAQwo/edit#heading=h.uioatehl6iil)### Credits
Group members:
- Alaβa Tamam
- Isha Chadalavada
- Rohit Kaushik
- Parth Kabra
- Arjun BhatUnder the advisement of Prof. Beth Noveck, Prof. Dan Jackson, Marci Harris and the PopVox foundation.