??? | React.js, Node.js, MongoDB, GraphQL

Settaz

PHP and C# Developer. Project Saturn Coming!
Jul 4, 2010
175
49
??? (I don't have a title or a finished idea of what I'm even making) - Basically this is just a fun project I'm working on when I have time, there will be constant updates though I thought I'd add it to DevBest for old times sake.
Ignore the Repo name too, I just put it as a CMS by default but it's not really. We'll see.

Btw, all client side stuff is not yet being fed any data or requesting any besides the news which is just fetching a News API on the backend and then using that JSON data to then send JSON data when asked for it.

Technologies:
  • React.js - Functional Components -> Hooks, Reducers, & Contexts
  • Node.js - Express for the server framework
  • MongoDB - with Mongoose for Models, etc.
  • GraphQL - One endpoint, I like concise results from my api
  • Apollo Client - For the React + GraphQL stuffs
  • Bulma - To make the frontend at least decent looking
Images(They're pretty large):
You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

Source:
 

Settaz

PHP and C# Developer. Project Saturn Coming!
Jul 4, 2010
175
49
Why not use ?

1. I like going though the process, even if it's difficult seeing what I'm doing and learning new things whilst doing so I feel like Prisma with Graphql-Yoga kinda takes that process away.
2. I'm doing all this locally so then there's docker that I'd have to worry about and by that I mean understanding further than the standard same sentence about how "it's a vm but not really".
3. Prisma is a bit overbearing, which can be a good or bad thing depending on what you want.
Post automatically merged:

Forgot to post about last update so I'll just copy the two here.

Authentication:
- Middleware created for express server
- Cookies used instead of local or session storage, with HTTP Only option to prevent javascript modification of token
- JWT Tokens used for signing and verification
- User assigned based on that verified token on the server side, no javascript involvement in tokens
-Resolvers starting to reflect these changes with the ability to check if a user is authorized

Apollo:
- Login Query added and token is assigned upon login
- Credentials included option enabled in HTTP Link
- Query added to gather posts from logged in user and provided for feed

Subscriptions
- Websocket created
- Switched to Apollo Server with Express
- Added post creation subscription type defs

Other
- Move some authorization around out of resolvers explicitly (pasword hashing, etc)
- Created add type for Feed Reducer
- Moved Get Posts query to separate file
- Moved News API fetch back to front end
- Other sight cleaning up

Subscription Live Update Example:
y3yOMhw.gif

edit: Idk why a post from like a week or two ago is being merged with my most recent but w.e
 
Last edited:

Users who are viewing this thread

Top