Skip to main content

Command Palette

Search for a command to run...

Grafbase x Hashnode Hackathon

Updated
2 min read
Grafbase  x Hashnode Hackathon
L

French software engineer building a new life in Japan. My journey here is a big challenge—from learning the language to navigating the tech scene. I use this blog as a space to share what I'm learning, both in tech and in life.

About the hackathon

In August, I participated in the GrafbaseHackathon (the 5th one now).

This time, it's about using the Grafbase tool, a serverless database platform open-source platform to deploy with a GraphQL API to connect.

Please check the hashnode post to get the full info about it.

Links

Ideas

I wanted to code a POC with grafbase and another frontend framework "Remix" so I took an old project idea I wanted to start with angular 6 months ago and I worked on it.

I wanted to make a small POC of an old game called "Ogame" with just a simple function as an increment building level and create a fleet.

Few links here:

Grafbase to store planets data

About grafbase, it's quite easy to understand cause it looks like planetscale but with a "pathfinder" part to do query and mutation request on database. You can run the pathfinder on local as well. I also used httpie.io instead of postman to make http requests.

Here is the basic schema model I used

type Planet @model {
  name: String!
  metalMineLevel: Int @default(value: 1)
  crystalMineLevel: Int @default(value: 1)
  deuteriumMineLevel: Int @default(value: 0)
  resources: Resources
  fleet: Fleet
  owner: User
}

type Resources @model {
  metal: Int @default(value: 500)
  crystal: Int @default(value: 500)
  deuterium: Int @default(value: 100)
}

type Fleet @model {
  lightFighterCount: Int @default(value: 0)
}

type User @model {
  name: String! @unique
  planet: [Planet]
}

I think it would be nice to use the NASA open-data in the game as well and we can link multiple other database with grafbase using connectors.

Remix

About Remix, I wanted to test a React framework cause I like to follow a file structure and for me, with React alone it can be a mess. Also, I'm mainly working with Angular, so it's very strict about routes, components, etc. There are so many things to know about that now I would like up my React skills before using too much React framework.

Conclusion

The most I use serverless databases, the most I like it. Very nice to not have to handle the db anywhere and the API system is perfect for small front web apps.

More from this blog

L

LPM Blog

194 posts

日本でのキャリアを切り拓く私の挑戦の記録です。

ここでは、私の就職活動の道のり、技術的な学び、そして異文化で働くことの喜びと苦労を共有していきます。

この挑戦を通じて、ITエンジニアとしての成長を皆さんにお見せできれば幸いです。