0x1eef
2bf57351ea
Not all website features are working, but this commit is mostly focused on an architecture that can be used in future projects
2.2 KiB
2.2 KiB
About
Twenty is a standalone web application with a practical purpose. But it's also a place where I can experiment with a different stack for the development of [web] applications in Ruby. See Design for more info.
Design
- The server/ is powered by Ruby
- rack, graphql-ruby, and puma
- The server provides the /graphql endpoint for client <-> server communication
- The server serves static files (HTML, JS, CSS, ...) via puma (Ruby HTTP server)
- The /graphql endpoint enters the graphql-ruby stack
- The client/ is powered by NodeJS
- webpack, typescript, react, and react-router
- The client produces a build/ directory
- The client provides static files (HTML, JS, CSS, ...)
- The client provides routes via react-router
- The client communicates with the server via @apollo/client (GraphQL client)
- The cli is powered by Ruby
- Start / stop web server
- Run database migrations
- Run developer console
- Available as a RubyGem executable
- Each component (server, client, cli) are separate packages in a monorepo
- Easy to distribute as a RubyGem
Usage
CLI
Usage: twenty COMMAND [OPTIONS]
Commands:
up Start the twenty web server
down Stop the twenty web server
connect Connect a project to twenty
disconnect Disconnect a project from twenty
migrate Migrate the database
console Start the twenty developer console
Install
Twenty is distributed as a RubyGem:
$ gem install twenty
Sources
License
BSD Zero Clause.
See LICENSE