8000 Tech · dawg/dawg Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Jacob Smith edited this page May 26, 2020 · 5 revisions

This section will outline the important technologies that we use for development. A lot of links will be shared (e.g. to articles/documentation) that should be read or at least skimmed through.

TypeScript

The DAWG app is written in TypeScript. If you don't already know, TypeScript is a superset of JavaScript that offers type-checking and compiles to JavaScript. It is pretty important that you know how TypeScript works but if you know how to write JavaScript, TypeScript should be pretty intuitive. Instead of going into detail in this guide, I'm going to link to some nice articles that you should read if you're unfamiliar with the language.

Vue

We use Vue for our frontend codebase ✌️For component files, we are fully embracing the composition API. For new components, the composition API should be strictly used. The Vue documentation is a great resource for learning :)

Tailwind CSS

We use Tailwind CSS for styling components with a little vanilla CSS sprinkled on top. But what is Tailwind?

Tailwind CSS is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override.

We chose Tailwind CSS rather than a component library as it gives us more control/flexibility. Please read through the Core Concepts to ensure you have a good understanding of the Tailwind system (you don't need to ready through everything, use your best judgement while going through the documentation)! While you're at it, take a look at some of the content in refactoring ui (a website from the creators of Tailwind CSS). They have a great set of design tips, articles and screencasts. If you really want to get into their content, I highly recommend purchasing their book 📖

Flex

Whether you're doing mobile or web development, display: flex will be your best friend for doing your layout. It'll take some time getting used to but it's 100% worth it! A Complete Guide to Flexbox is the best article I've found as it explains the background, terminology and is a great reference for all of the different CSS flex attributes. Bookmark this link as you will definitely need to reference the documentation while developing!

PS: Tailwind CSS works very well with flex based design!

State Management

We do not use vuex for state management. We use a mixture of global, component and extension state to manage the state of the app. Check out the Architecture page for more information about extensions!

io-ts

The io-ts TypeScript package that helps you validate types at system "boundaries". But what are "boundaries"? In my experience, this is things like localStorage (for web development), async-storage (for React Native) and REST APIs (for frontend and backend development). For example, localStorage allows you to storage key value pairs but the value must be a string. If you want to storage a different data structure (e.g. an array of strings or even a boolean value), you have to stringify the data using JSON.stringify before writing your data to localStorage. After extracting and parsing the same data, how do you know that the data you are receiving is in the same format? What if a month has gone by and you've changed your data structures? This is where io-ts comes in handy. I won't go into details here as they great docs which you can find here.

ESLint

With the deprecation of TSLint, ESLint is the defacto linter for the JavaScript ecosystem. Each repository will be configured with a set of rules that the linter will use to lint your code. As mentioned above, it is essential that you use this during development to avoid common errors. For example, React Hooks publishes a Rules of Hooks that are enforced using eslint-plugin-react-hooks which you will need.

Prettier

Prettier is an absolutely amazing utility (that you will quickly fall in love with) that is used to ensure that all code follows the same format. If you've followed the IDE Setup guide, prettier should automatically run when you save any file. Formatting while saving or before committing code is super important as it ensures a good commit history.

GitHub Actions

GitHub Actions are used to automate testing and deployment. These "actions" are always located in the .github/workflows files.

Note: GitHub Actions (along with most GitHub features) are free for public repositories. All of the tech used in this repository!

Clone this wiki locally
0