Skip to content

alizhdanov/alizhdanov.dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monorepo for alizhdanov.dev

conssits of:

  • frontend
  • backend
  • serverless

Disclaimer

You can consider this project as an educational. That's why some aproaches might not be the best, but it's here just because I want to learn something new, try technologies in combination with each other and potentially share code to help others (at leat I hope so 😊) .

CI and CD

Powered by circleci. The ci will check which projects were changed and will run jobs only for specifc project. Therefore, CI time will increase if you have changed only some project also it wouldn't do useless builds. All builds from master which passed all tests deployed sraight to production. In future all merge requests should be deployed for tesing, but not now.

Serverless

Serverless part based on serverless framework and AWS as a serverless provider. It's implementing basic REST API like authentication service, which then used by GraphQL server for generation of JSON Web Tokens. DynamoDB is used as database and each endpoint is Lambda Function. Labda functions are tested with JEST testing framework.

The service is pretty basic for now and implementing only two endpoints:

  • singup - user creation
  • login - user authintecation and generation of JWT token

GraphQL part written in Typescript, based on GraphQL yoga server and daployed to NOW.

The main idea behind it is to show capabilities of GraphQL. By combining different services in one place, and providing nice unify GraphQL API for frontnend. It was implemented by transforming and proxying REST services into GraphQL queries and mutations by GraphQL Nexus and by schema stiching third party GraphQL services.

Services:

  • Github - Github V4 API is providing GraphQL API, so it is just merged with current GraphQL server by schema stitching. While stitched all needless queries and mutation were filtered out, and server providing to the client (frontend in our case) only that queries and mutations which needed by frontend. Which is showing all beauty of schema stitching approach and providing extra safety by not exposing needless data.

  • Instagram - Instagram API providing us REST API which is good example, to show how it's possible to use some legacy services with GraphQL by proxying it. We can design schema as needed by our clients and under the hood still use REST API.

  • Serverless - in serverless section was already mentioned that authentication service was implemented. It uses similar approach as Instagram

Authentication and Permissions

JWT is used for authentication provided by authentication service. Public key is used to verify token . While graphql-shield is handling queries/mutation permissions. Giving ability to acess protected fields by only logged in users.

Frontend part divided by two main sections Hero and SPA. Deployed to Netlify

Hero

Contains all contacts info and avatar. Basic html and css just so potential visitors will be able get instant result and to see all important information.

SPA

This part is specifically done as a separate section. Because it'll be used to show all how GraphQL part can be implemented on backend and might be not interesting for people who wanna know more info about author.

It's still under development and will be updated in future.

About

Monorepo containing all related parts for website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published