Overview of My Submission
Stoa is a small forum app. The inspiration is a need of minimalistic internal forum for organizations. Designed to look like a typical social media app.
The main purpose of the project is to test redis as main database. I am using redisJSON to store documents and RediSearch to perform searches.
Stack:
- Typescript
- Next.js
- tailwindcss
- Redis stack
Some thoughts from mine experience:
Advantages:
- Easy to understand
- Fast integration thanks to redis-om-node library. In dozen minutes, we are ready to start manipulating with documents.
- We can storage several types of data, not only json.
- RedisInsight app is really helpful during development process. Cool!
Disadvantages:
- It's tricky when we want to build related data structure. We need to handle it by extending an entity class.
- We have to create index on a collection, before starting to search anything. It's tricky for the first time.
Submission Category:
MEAN/MERN Mavericks
Language Used
JS/TS/Node.js
Link to Code
pavelee / stoa-redis-stack
Share your ideas among community
Stoa
Stoa is a small forum app. The inspiration is a need of minimalistic internal forum for organizations. Designed to look like a typical social media app.
The main purpose of the project is to test redis as main database. I am using redisJSON to store documents and RediSearch to perform searches.
Stack:
- Typescript
- Next.js
- tailwindcss
- Redis stack
How it works
How the data is stored:
Data is stored as documents using redisJSON
How the data is accessed:
Data is accesed through redis-om-node
How to run it locally?
You can run it loccaly using docker.
Prerequisites
- Docker
Local installation
Run containers
docker-compose up -d
Acess app in the borwser
http://localhost:3000
More Information about Redis Stack
Here some resources to help you quickly get started using Redis Stack. If you still have questions, feel free to ask them in the Redis Discord or on Twitter.
Getting Started
- Sign up for…
Additional Resources / Info
- Check out Redis OM, client libraries for working with Redis as a multi-model database.
- Use RedisInsight to visualize your data in Redis.
- Sign up for a free Redis database.
Top comments (3)
Nice.
I never tried Redis OM. How does it handle and store relations - it just encodes them in the keys or?
Thanks!
It doesn't handle relations. You can embed a document or keep foreign key as a string.
eg. in the app, we fetch author of post by getter:
So later in code we can do:
I see... I noticed annotations for relations in an example Java code, but I guess that's limited to Java/Spring Redis OM flavor...