This project is a simplified "Slack" clone built with Node.js, TypeScript, and GraphQL. This project is an opportunity to learn and practice building real-time communication applications with these technologies.
- Real-time Messaging: Users can send and receive messages in real-time.
- Channel Management: Create and join channels for different topics or teams.
- GraphQL API: Efficient data fetching and real-time updates with GraphQL subscriptions.
- TypeScript: Strongly typed codebase for improved developer experience and maintainability.
- (maybe) User Authentication: Basic user authentication with session management.
- Node.js: Backend runtime environment.
- Express: Web framework for building the server.
- TypeScript: Type-safe development.
- GraphQL: API for querying and mutating data.
- WebSocket: Real-time communication between client and server.
- React: Frontend library for building user interfaces.
- SQLite: Lightweight relational database for storing messages and user data.
-
Install the dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root directory and add the following:PORT=5050 DATABASE_URL=./dev.db
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5050.
The frontend is a simple React app that connects to the GraphQL API.
-
Install the dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000.
├── client # React frontend
│ ├── src
│ ├── public
│ └── package.json
├── src # Node.js backend
│ ├── resolvers # GraphQL resolvers
│ ├── schema # GraphQL schema
│ ├── models # Database models
│ ├── server.ts # Server entry point
│ └── utils # Utility functions
├── .env # Environment variables
├── package.json
└── README.md