The project is relatively straight-forward, and I’m sure it’s been done before. But this is my take. RIPChat is meant to be a very temporary, and anonymous messaging service using REDIS as a primary store for channels and messages. Let me know what you think I’m doing right or wrong.
https://github.com/DLzer/ripchat
Seems like a pretty decent first stab. Some feedback:
Decouple from Redis and offer multiple persistence options.
Add OpenAPI schema support. For those trying to test this service out, we can import the spec file into Postman and tinker around with it. You can also use the spec file to code generate an SDK. You can also use the spec file to validate incoming requests (and outgoing responses) in a middleware layer.
Why do you have separate log files for the different areas of concern in the application? Just create a single log file – it will make debugging and tracing calls much easier.
I’m not a big fan of singletons, but in the case of logging, I usually make an exception. Instead of injecting your logger everywhere into everything, maybe consider a static call to Log::debug() or Log::info()?
What the hell is going on in the RedisFactory constructor? Looks like you’re trying to do your own autoloading? Why is this even in here if you have composer?
Members
Online