This project is a TypeScript-based rewrite of the original Reveal.js seminar server. The rewrite leverages TypeScript to improve code maintainability, scalability, and developer experience. It is meant to be a drop-in replacement, meaning all your favorite Reveal.js plugins will still work out of the box.
** NEW ** The server now has a built-in web UI for admins, courtesy of Socket.IO Admin UI. From here, you can see information about all connected sockets and rooms. To reach it, start the server and visit http://your-host:your-port/admin (e.g. http://localhost:4433/admin).
-
Clone the Repository:
git clone https://github.com/your-username/seminar-ts-server.git cd seminar-ts-server -
Install Dependencies: Ensure you have Node.js (>= 22.0.0) installed. Then run:
npm install
-
Set Up Environment Variables: Create
.env.devand.env.prodfiles in the env directory for development and production configurations. Example:NODE_ENV=development PORT=4433 SOCKETIO_ADMINUI_AUTH=false -
Run the Server:
- For development:
npm run dev
- For production:
export NODE_ENV=production npm run start
- For development:
Clients can be obtained from the Reveal.js seminar plugins repository. If you have a server running on localhost, you can check out the live demo here.
TypeScript offers several advantages over vanilla JavaScript:
- Static Typing: Helps catch errors at compile time, reducing runtime bugs.
- Improved Tooling: Provides better IntelliSense, autocompletion, and refactoring support in IDEs.
- Scalability: Improved tooling means it is easier to extend the codebase and implement new features.
- Maintainability: Strong typing and interfaces improve code readability and maintainability.
- Modern JavaScript Features: TypeScript supports the latest JavaScript features and compiles to CommonJS.
The project is organized as follows:
- src: Main source code directory.
models/: Class definitions forUser,Room, andMessage.db/: In-memory store forUser,RoomandMessageobjects.types/: Type definitions for events, payloads, and data structures.handlers/: Event handlers for incoming Socket.IO events.utils/: Utility functions for common tasks.server.ts: Main server implementation using Socket.IO.main.ts: Entry point for the application.
- public: Static files served by the server.
- env: Environment-specific configuration files.
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.