A modern chat application built with Next.js and Mantine UI that allows you to connect, chat, and celebrate with yourself! This application demonstrates a multi-persona messaging system where you can switch between different personas to have conversations.
This application was based on the following repository: Next.js Pages Template by Mantine
That was created by the Mantine UI maintainers. I chose this repository as a base because I came from a team that used Material UI. I wanted to try something new that would work better with NextJS and this was a great example to start with.
For the backend of my application, I utilized NextJS API routes and chose to use Firestore from Firebase as my database. It is a data store that I've used previously and fit for the solution for what I was needing.
- Next.js 15 - React framework with App Router
- React 19 - UI library
- Mantine UI 8 - Modern React components library
- TypeScript - Type-safe JavaScript
- PostCSS with mantine-postcss-preset
- Firebase Firestore - NoSQL cloud database
- Next.js API Routes - Server-side API endpoints
- Storybook - Component development and testing
- Jest with React Testing Library - Testing framework
- ESLint with eslint-config-mantine - Code linting
- Prettier - Code formatting
- Stylelint - CSS linting
- Multi-Persona Messaging: Switch between different personas to have conversations
- Real-time Chat Interface: Modern chat UI with message bubbles and avatars
- Color-coded Messages: Each persona has a unique color for easy identification
- Responsive Design: Works seamlessly across desktop and mobile devices
- Firebase Integration: Cloud-based data storage with Firestore
- Node.js (version specified in
.nvmrc) - Yarn package manager
- Firebase project with Firestore enabled
-
Clone the repository:
git clone <your-repo-url> cd party-me
-
Install dependencies:
yarn install
-
Create a
.env.localfile in the root directory with your Firebase configuration:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
-
Start the development server:
yarn dev
-
Open http://localhost:3000 in your browser.
yarn dev- Start development serveryarn build- Build application for productionyarn start- Start production serveryarn analyze- Analyze application bundle with @next/bundle-analyzer
yarn typecheck- Check TypeScript typesyarn lint- Run ESLint and Stylelintyarn eslint- Run ESLint onlyyarn stylelint- Run Stylelint onlyyarn jest- Run Jest testsyarn jest:watch- Start Jest in watch modeyarn test- Run all tests (Jest, Prettier, ESLint, TypeScript)
yarn prettier:check- Check files with Prettieryarn prettier:write- Format all files with Prettier
yarn storybook- Start Storybook development serveryarn storybook:build- Build production Storybook bundle
- Home Page (
/) - Welcome screen with introduction and navigation to messages - Messages Page (
/messages) - Main chat interface where conversations are displayed
GET /api/messages- Retrieve all messagesPOST /api/messages/seed- Seed the database with sample messagesDELETE /api/messages/drop- Clear all messages from the databaseGET /api/parts- Retrieve all personas/partsPOST /api/parts/seed- Seed the database with sample personasDELETE /api/parts/drop- Clear all personas from the database
- View Messages: Navigate to the Messages page to see all conversations
- Switch Personas: Use the
persona_idquery parameter to switch between different personas- Example:
/messages?persona_id=1to view messages as persona 1
- Example:
- Seed Data: Use the API endpoints to populate the database with sample data
- Clear Data: Use the drop endpoints to clear the database when needed
party-me/
├── app/ # Next.js App Router pages and API routes
│ ├── api/ # API endpoints
│ ├── db/ # Database configuration and repositories
│ ├── messages/ # Messages page
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable React components
│ ├── ColorSchemeToggle/ # Theme toggle component
│ ├── Messages/ # Messages display component
│ ├── Navbar/ # Navigation component
│ └── Welcome/ # Welcome component
├── types/ # TypeScript type definitions
├── test-utils/ # Testing utilities
└── public/ # Static assets
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
yarn test - Submit a pull request
This project is licensed under the MIT License - see the LICENCE file for details.