This is a chat-app that was built using Open AI's API. You can:
- Chat with Open AI's models
- Summarize and store your conversations
- Configure the session's settings, i.e. the model's parameter such as the Temperature, Max Token Length, and System Prompt
For this project, I thought about how I could further improve the design of Chat GPT to enhance the user's experience. Here are some of the design decisions I took and the reasoning behind them:
- Clear Call-to-Actions (CTAs) so that the user knows what to do immediately → I felt that Chat GPT's homepage is cluttered. There's info about the models, prompt templates, a textarea for the chats, and a side-drawer with the previous conversations. I decided to strip away all of this information so that the user understands what the app's core feature is. Then, once they feel ready to check the other features out, they can click on the icons.
- Prompt templates on the chat page → They're displayed before the conversation has been initiated, before the user has typed anything. So, in case, the user has run out of ideas, they can fall back on the templates.
- A separate about page → The product's capabilities and limitations were placed together with the prompts, thus making it difficult to distinguish between them. So, I decided to assign them a separate page that the user could check out if they're interested to learn more.
- I like the Open AI's chat page; it feels like you're having a conversation with an actual person. So, I decided to lean further in this direction by creating a chat interface similar to Whatsapp, with speech bubbles, and typing animations.
- Dark theme for accessibility → So that it doesn't strain the users' eyes.
- The frontend's responsive and works on mobile too
- React
- TypeScript
- TailwindCSS for utility CSS classes
- ESLint configured with some initial rules
- Prettier to enforce consistent code style
- Vitest for unit testing and code coverage
- Vite to build the project for development or production
- Husky 🐶 runs the full list of specs before committing your changes to ensure that you have a green build
-
git clone https://github.com/nrabhiram/chat-gpt-ui.git
-
Run
npm install
to install all of the project's dependencies -
Build the project for production:
npm run build
-
Run the local development server:
npm run dev
-
Create a
.env
file in the project root folder and add your API key:VITE_OPENAI_API_KEY = <YourApiKey>
-
Create a CSS Module file by following the naming convention -
<Component>.module.css
-
Use the
@apply
directive in your CSS class definitions to use Tailwind's utility classes into your own custom CSS.app-heading { @apply text-5xl font-semibold mb-4; }
-
Import the CSS Module file into the React component file
prettier-format
- run the autoformatterlint
- run the lintertest
- run the specstest-filter <spec-name>
- run a specific speccoverage
- get a coverage report of the specsbuild
- build the project files for distributiondev
- run the local development server
Feel free to open an issue or create a PR if you'd like to contribute 🙌
The project is available as open source under the terms of the MIT License.