Ich habe Cloudinary zur Bildspeicherung verwendet, deswegen wird eine API Umgebungsvariable benötigt!
Dazu eine .env Datei im Projektordner erstellen und die Umgebungsvariable hinzufügen.
touch .env
# .env
CLOUDINARY_URL=cloudinary://298522699261255:Qa1ZfO4syfbOC-***********************8
Die Cloudinary API Umgebungsvariable gegebenfalls bei mir anfragen.
Recipe Model
Recipe CRUD
Layout und Design
User Model
A User has 1:N Recipes
Boostratp to make it responsive
Login and simple user authentification
Public API
Bemerkung: Diese app benutzt esbuild anstatt Importmaps
DB Schema mit Active Storage (für Cloudinary)
-
System dependencies:
Yarn package manager (or NPM - I used Yarn)
Bundler -
Database creation:
Runbin/rails db:create
Runbin/rails db:migrate
-
Database initialization:
Runbin/rails db:seed
-
How to run the test suite:
Runbin/rails test:all
Anyone can fetch recipe data.
Get all recipes
rezeptbuch.fly.dev/api/v1/recipes
For a specific recipe, include the recipe ID
rezeptbuch.fly.dev/api/v1/recipes/:id
eg, rezeptbuch.fly.dev/api/v1/recipes/8
To get a local copy up and running follow these steps.
-
Change to the desired directory then run the following:
- Git clone the project
- cd rezeptbuch/
- run
npm install
oryarn install
- run
bundle install
- run
bin/rails assets:precompile
- run
bin/rails db:create
- run
bin/rails db:migrate
- run
bin/rails db:seed
_Steps to execute the app locally_
Run
bin/rails server
in the console in the working directory
_Steps to execute the app's test suite locally_
Run
bin/rails test:all
-
Ruby Version
3.3.0 -
Rails Version
7.1.3 -
Databenbank
LiteStack litedb (SQLite3)