A real time chat app
https://chat.jusemon.com/
- Migrated ESLint configuration from Next.js to SolidJS - Removed React-specific ESLint plugins - Updated Turbo configuration with global dependencies - Simplified Prisma scripts in API package - Added shared ESLint and TypeScript configs to web and API packages - Cleaned up unnecessary dependencies and configurations |
||
|---|---|---|
| .vscode | ||
| apps | ||
| packages | ||
| .dockerignore | ||
| .gitignore | ||
| .npmrc | ||
| docker-compose.yml | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| turbo.json | ||
Unreal Chat
A real-time chat application built with SolidJS, GraphQL, and Prisma.
Project Structure
This is a monorepo containing the following packages:
apps/api: GraphQL API server built with Apollo Server, GraphQL, and Prismaapps/web: Web client built with SolidJS and URQL GraphQL client
Features
- Real-time chat with GraphQL subscriptions
- User authentication
- Chat room management
- Message sending and receiving
- Public and private chat rooms
Getting Started
Prerequisites
- Node.js (v18 or later)
- npm (v10 or later)
- MariaDB or MySQL
Installation
- Clone the repository:
git clone https://github.com/yourusername/unreal-chat.git
cd unreal-chat
- Install dependencies:
npm install
- Set up environment variables:
Create a .env file in the apps/api directory:
DATABASE_URL="mysql://root:password@localhost:3306/unreal_chat"
JWT_SECRET="your-secret-key"
Create a .env file in the apps/web directory:
VITE_API_URL=http://localhost:4000/graphql
VITE_WS_URL=ws://localhost:4000/graphql
- Initialize the database:
npm run prisma:init
- Start the development servers:
# Start both API and web servers
npm run dev
# Or start them individually
npm run api:dev
npm run web:dev
The API will be available at http://localhost:4000/graphql and the web app at http://localhost:5173.
Available Scripts
npm run dev- Start all development serversnpm run api:dev- Start the API development servernpm run web:dev- Start the web development servernpm run build- Build all packagesnpm run api:build- Build the APInpm run web:build- Build the web appnpm run prisma:generate- Generate Prisma clientnpm run prisma:migrate- Run Prisma migrationsnpm run prisma:studio- Open Prisma Studio
Technologies
Backend (API)
- Apollo Server
- GraphQL
- Prisma ORM
- MariaDB
- JSON Web Tokens (JWT)
Frontend (Web)
- SolidJS
- URQL GraphQL Client
- GraphQL Subscriptions
- CSS
License
This project is licensed under the MIT License - see the LICENSE file for details.