The Sinatra project is your first web application -- complete with a database! Look Ma, I built a website! In a few lessons, you'll be presented with the project requirements. Here is an opinionated guide for successfully getting going with your Sinatra project.
Use this lesson to help you complete this planning form
Tips on all aspects of the project are included here, so make sure to have a look through!
Note: Keep in mind that the Ask a Question is not permitted to help while you are building your projects. Use the internet and the resources provided in this document if you get stuck!
Read through the project requirements and make sure you understand them!
Ideate! What do you want to build? Some considerations:
- Choose a domain you're familiar with! - Choose a domain you care about - Choose a domain that fits the project specs
User stories describe how a user would use your app, such as “A user should be able to…” or “As a user, I can, …” and finish the sentence. Stick with high-level, like, “A user can sign up or log in, create widgets, and edit and delete widgets they own.”
Distinguish user stories that relate to your MVP from those that describe stretch goals. What’s the difference?
- MVP = 'Minimum Viable Product': the most basic app that meets requirements and has core functionality - Stretch features: bonus features you want but don't need Have clear goals regarding MVP and stretch features. Once you have your MVP up-and-running, it’s a good idea to use feature branches from there and merge them in only when they’ve been thoroughly tested. This way, once you have a working version of your app, you always have a working version of your app. In theory, anyway.
- your models - their attributes - their relationships - a basic flow of how your application will work
- Migrations - Model classes - Associations (& validations if you wish to use them -- you’ll at least need a validator to protect against duplicate login credentials across different users, usually username or email)
- create some seed data - adjust migrations as needed
- add your login/signup/signout routes
Build out controller routes for other models (add a controller for each model)
Build views and controller actions based on the flow of your app, one step at a time, testing as you go!
- Use `shotgun` and `pry` (or `raise`/`inspect`) all the time!
draw.io: Not an artist? No problem! Draw.io is a free tool for, well, drawing, but it’s great for making model diagrams and wireframing your site. Check it out!
Corneal: Corneal is a gem used for scaffolding out a Sinatra project. You are
welcome to use it. However, you should understand what it's doing. Remove any
folders and files you're not using. For example, if you're not going to write any
tests, delete the
spec folder. Feel free to build your project out by hand if you
The Sinatra Docs: What?! You haven’t looked through the Sinatra documentation yet?? Do yourself a favor and check them out. A good library should have good docs, and Sinatra definitely does. Official documentation is a good starting point for whatever tool you’re using.
Slack: You’re in the #sinatra-section channel, right? Drop questions you have in there, work together with your fellow students!
Study groups: Look out for study groups. These could be instructor-led or student-led, and in particular look for open office hours, project support office hours, or topics pertaining to what you’re building.
Some context: What should we be learning here anyway?