- Introduction
- Features
- Setup and Installation
- Usage
- Controllers and Actions
- Customization
- Contributing
- License
This Rails application allows users to create, edit, and manage journeys and pins. Users can add text and photos to their journeys. They can follow their journey on a map by following the route. Users could potentially create a video summary of their journey when it's completed. The application also includes functionality for undoing actions and dynamically placing and resizing elements.
- Create and manage journeys and pins.
- Add text and photo inputs to journeys.
- Undo the last action.
- Dynamic resizing and positioning of text and photo elements.
- SweetAlert integration for confirmation dialogs.
1.Clone the Repository:
git clone https://github.com/yourusername/your-repo.git
cd your-repo2.Install Dependencies:
bundle install
yarn install3.Set Up the Database:
rails db:create
rails db:migrate4.Environment Variables:
Create a .env file in the root directory and add your Cloudinary credentials:
MAPBOX_API_KEY=your_apikey
CLOUDINARY_URL=your_cloudinary_url5.Start the Server:
rails server6.Visit the Application:
Open your browser and go to http://localhost:3000.
- Navigate to the "New Journey" page.
- Fill in the required details and submit the form.
- You will be redirected to the journey's show page, where you can add pins.
- On the journey's show page, click on "Add Pin."
- Choose between one of our beautiful templates or a blank canvas.
- Choose between adding text or photo inputs.
- For text, enter your text and click outside the input to save it.
- For photos, upload an image file from your device.
- Resize and reposition the elements as needed.
- If you want to undo the last action, use the undo functionality provided in the application.
- connect: Initializes the canvas and gesturable elements.
- toggleSideBar: Toggles the sidebar visibility.
- onChangeColor: Changes the background color of the canvas.
- addTextInput: Adds a new text input to the canvas.
- addPhotoInput: Adds a new photo input to the canvas.
- handleTextChange: Handles changes to text inputs.
- handlePhotoChange: Handles changes to photo inputs.
- initializeInteract: Initializes draggable and resizable functionality for elements.
- initializeGesturable: Initializes gesturable functionality for elements.
- undoLastAction: Undoes the last action.
- index: Lists all journeys.
- show: Displays a specific journey.
- new: Shows the form for creating a new journey.
- create: Creates a new journey.
- edit: Shows the form for editing a journey.
- update: Updates a specific journey.
- destroy: Deletes a specific journey.
- create: Creates a new pin within a journey.
- edit: Shows the form for editing a pin.
- update: Updates a specific pin.
- destroy: Deletes a specific pin.
To customize the application's appearance and functionality, you can modify the corresponding controllers, views, and stylesheets.
Add your custom styles to 'app/assets/stylesheets/application.css' or create new stylesheets and include them in the application. Edit the views located in 'app/views' to change the HTML structure and content displayed to users.Contributions are welcome! Please fork the repository and create a pull request with your changes.
- Fork the repository.
- Create a new branch: git checkout -b my-feature-branch
- Make your changes and commit them: git commit -am 'Add new feature'
- Push to the branch: git push origin my-feature-branch
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.