This is a professional Ruby application that uses Sinatra and SQLite3 to create a web application with Bootstrap styling.
- Bootstrap Styling: The application uses Bootstrap for a clean and modern user interface.
- User List: The application queries data from a SQLite3 database and displays a list of users.
- Contact Form: The application includes a contact form in a modal dialog.
- Ruby: The application is written in Ruby.
- Sinatra: Sinatra is used as the web application framework.
- SQLite3: SQLite3 is used as the database for storing user data.
- Bootstrap: Bootstrap is used for styling the web application.
![Screenshot 2024-04-09 at 1 07 05 PM](https://private-user-images.githubusercontent.com/81951239/320958328-64c10894-acde-4b4f-88dd-0483171ceb69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2NDc3OTksIm5iZiI6MTcxOTY0NzQ5OSwicGF0aCI6Ii84MTk1MTIzOS8zMjA5NTgzMjgtNjRjMTA4OTQtYWNkZS00YjRmLTg4ZGQtMDQ4MzE3MWNlYjY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDA3NTEzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdhNjNjODhiMDZhMDU2MmFmOWZjNzdiMzVmY2RjYjBmYzI3NGM5YTQzZmNmNWI2N2VlNTcyODk0M2UyNjE5YWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5XBpjZVPDCYhrq1H1k93FlO0UMz6Hd1C_lUcD3ByA4c)
The application connects to a SQLite3 database using the sqlite3
gem. The database is set up in the setup_db.rb
file, where a users
table is created and populated with sample data.
The project consists of three main files:
index.rb
: This is the main HTML file for the web application.app.rb
: This is the main Ruby file that sets up the Sinatra application and routes.setup_db.rb
: This file sets up the SQLite3 database.
To get started with this project:
- Clone the repository.
- Install the required gems with
bundle install
. - Set up the database with
ruby setup_db.rb
. - Start the Sinatra application with
ruby app.rb
.
This project serves as a great starting point for learning how to create a web application with Ruby and Sinatra. It demonstrates how to set up a SQLite3 database, how to query data from the database, and how to display the data in a web page.
Contributions to this project are welcome. Please fork the repository and create a pull request with your changes.