Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgaskins/wax
Code generator for Crystal backend web apps and APIs
https://github.com/jgaskins/wax
Last synced: 13 days ago
JSON representation
Code generator for Crystal backend web apps and APIs
- Host: GitHub
- URL: https://github.com/jgaskins/wax
- Owner: jgaskins
- License: mit
- Created: 2023-11-04T21:47:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T06:49:04.000Z (about 1 month ago)
- Last Synced: 2024-12-17T11:48:34.289Z (17 days ago)
- Language: Crystal
- Size: 117 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wax
Wax is an opinionated Crystal code generator for web applications and APIs. It
provides conventions to follow to write your backend Crystal code more quickly
using a few different Crystal shards:- [Armature](https://github.com/jgaskins/armature) for HTTP routing
- [Interro](https://github.com/jgaskins/interro) for querying your Postgres database
- [Conveyor](https://github.com/jgaskins/conveyor) for background jobs
- [Redis](https://github.com/jgaskins/redis) as the backing store for caching, background jobs, and sessions
- [Dotenv](https://github.com/gdotdesign/cr-dotenv) for loading configuration from .env files## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
wax:
github: jgaskins/wax
```2. Run `shards install` to install `wax` and its dependencies
## Usage
From your terminal:
```bash
bin/wax generate app YourAppName
```Wax will generate all the files your app needs to get started for your app. You can also abbreviate `generate` as `g`:
```bash
bin/wax g app YourAppName
```### Generating
You can generate several kinds of files:
| Files | Command |
|-------|---------|
| App | `bin/wax g app OnlineStore` |
| Models | `bin/wax g model Product id:uuid:pkey title:string description:string` |
| Migration | `bin/wax g migration add column products active:boolean` |
| Routes | `bin/wax g route Catalog` |
| Components | `bin/wax g component DatePicker` |## Development
TODO: Write development instructions here
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer