TaskMate is a collaborative task management application built with Ruby on Rails. This is a sample project designed to organize tasks, assign them to team members, and collaborate in a shared workspace.
- User Authentication: Secure login, logout, and registration for users.
- Task Management: Create, edit, delete, and view tasks with attributes like:
- Title
- Description
- Due Date
- Status (To Do, In Progress, Completed).
- Team Collaboration:
- Create and manage teams.
- Invite users to join teams.
- Assign tasks to specific team members.
- Authorization:
- Only team members can manage or view their team's tasks.
- Role-based permissions (e.g., admin vs member).
- Task Comments: Add comments to tasks for discussions and updates.
- Notifications: Email or in-app notifications for task updates.
- Search and Filters: Search tasks by keywords or filter by status, due date, or assignee.
- API Integration: Expose tasks and team data through a RESTful API.
- Backend: Ruby on Rails
- Database: PostgreSQL
- Authentication: Devise gem
- Authorization: Pundit or CanCanCan
- Front-End: Rails default views with Bootstrap
- Background Jobs: DelayedJob ActiveRecord
- Testing: RSpec
- Ruby 3.0+ and Rails 7+ installed.
- PostgreSQL installed and running.
- (Optional) Set up a new PostgreSQL user
taskmateand any password of your preference.
- (Optional) Set up a new PostgreSQL user
- Bundler installed (
gem install bundler).
-
Clone the repository:
git clone https://github.com/your-username/taskmate.git cd taskmate -
Install dependencies:
bundle install
-
Create/Update .env file from .env.sample file and fill up your PostgreSQL and SMTP information (if using gmail see here for apps password)
cp .env.sample .env
-
Set up the database:
rails db:create db:migrate
Optionally, you can seed the database with sample data:
rails db:seed
-
Start the Rails server:
rails server
-
Start the Delayed Job server:
bin/delayed_job start
-
Open the application in your browser at http://localhost:3000.
- Sign up: Create an account or log in with an existing one.
- Create a Team: Navigate to the "Teams" section to create a new team.
- Manage Tasks: Add tasks, assign them to team members, and update their status as they progress.
- Collaborate: Use the comments feature to discuss tasks with your team.
- Doorkeeper Application: Create a new doorkeeper application to generate a client_id and client_secret for oauth token generation.
- In rails console execute the following command:
-
Doorkeeper::Application.create!( name: "ror-task-mate-api", redirect_uri: "http://localhost:3000/callback", scopes: "public write" )
- OAuth token: Generate an oauth token using the client_id and client_secret (generated in previous step).
-
curl -X POST -d "client_id=client_id&client_secret=client_secret&grant_type=client_credentials" http://localhost:3000/oauth/token
-
- API Endpoints: Use the generated token to access the API endpoints.
- Teams:
- GET /api/v1/teams
- GET /api/v1/team/:team_id
- GET /api/v1/team/:team_id/tickets
- Tickets:
- GET /api/v1/tickets/:ticket_id
- Teams:
app/
├── controllers/ # Controllers for handling requests
├── models/ # Application models (e.g., User, Task, Team)
├── views/ # Views for rendering HTML pages
├── mailers/ # Mailers for email notifications
├── jobs/ # Background job definitions
├── policies/ # Authorization policies (e.g., Pundit)
config/
├── routes.rb # Application routes
├── database.yml # Database configuration