Skip to content

Commit 713cb61

Browse files
committed
Initialize with Job Tracker's code.
1 parent 609d09b commit 713cb61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+607
-164
lines changed

.env.sample

Lines changed: 0 additions & 10 deletions
This file was deleted.

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ gem "tzinfo-data", "~> 1.2024", ">= 1.2024.1", platforms: %i[windows jruby]
1414
gem "vite_rails", "~> 3.0", ">= 3.0.17"
1515
gem "phlex-rails", "~> 1.2"
1616
gem "devise", "~> 4.9"
17+
gem 'will_paginate', '~> 4.0'
1718

1819
group :development, :test do
1920
gem "debug", "~> 1.9", ">= 1.9.2", platforms: %i[mri windows]

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ GEM
333333
websocket-driver (0.7.6)
334334
websocket-extensions (>= 0.1.0)
335335
websocket-extensions (0.1.5)
336+
will_paginate (4.0.1)
336337
zeitwerk (2.6.15)
337338

338339
PLATFORMS
@@ -374,6 +375,7 @@ DEPENDENCIES
374375
tzinfo-data (~> 1.2024, >= 1.2024.1)
375376
vite_rails (~> 3.0, >= 3.0.17)
376377
web-console (~> 4.2, >= 4.2.1)
378+
will_paginate (~> 4.0)
377379

378380
RUBY VERSION
379381
ruby 3.3.1p55

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Yatish Mehta
3+
Copyright (c) 2024 Tony Gaeta
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 64 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,53 @@
11
<h1 align="left">
22
<a href="#">
3-
<img src="https://github.com/yatish27/shore/assets/1014383/fbad8ed2-9510-4693-a342-4bafa515b164" width="128px"/>
3+
<img src="https://github.com/user-attachments/assets/c5840b5d-efc9-4644-95ff-ac94c546a5d8" width="128px"/>
44
</a>
55

6-
Shore
6+
Job Tracker
77

88
<p align="left">
9-
<a href="https://github.com/yatish27/shore/actions">
10-
<img alt="Build Status" src="https://github.com/yatish27/shore/actions/workflows/ci.yml/badge.svg"/>
9+
<a href="https://github.com/tgaeta/job_tracker/actions">
10+
<img alt="Build Status" src="https://github.com/tgaeta/job_tracker/actions/workflows/ci.yml/badge.svg"/>
1111
</a>
12-
<a href="https://github.com/yatish27/shore/blob/master/LICENSE.txt">
12+
<a href="https://github.com/tgaeta/job_tracker/blob/master/LICENSE.txt">
1313
<img alt="License" src="https://img.shields.io/badge/license-MIT-428F7E.svg"/>
1414
</a>
15-
<a href="https://codeclimate.com/github/yatish27/shore/maintainability"><img src="https://api.codeclimate.com/v1/badges/1cd4e3f1c0a4c5af29b1/maintainability" /></a>
15+
<a href="https://codeclimate.com/github/tgaeta/job_tracker/maintainability"><img src="https://api.codeclimate.com/v1/badges/1cd4e3f1c0a4c5af29b1/maintainability" /></a>
1616
</p>
1717
</h1>
1818

1919
## Introduction 📜
2020

21-
Shore is a Ruby on Rails template with modern stack to start your new project.
21+
Job Tracker is a simple, powerful, and user-friendly web application designed to help job seekers efficiently manage their job search process. Built with Ruby on Rails and enhanced with modern web technologies, this tool streamlines the often overwhelming task of tracking multiple job applications.
2222

23-
## Features ⚡️
23+
<img alt="UI Screenshot" src="https://github.com/user-attachments/assets/1b4ec900-a670-4220-bf01-1df1cfba5914"/>
2424

25-
- **Ruby**: Ruby 3.3.1
26-
- **Rails**: [Rails 7.1](https://rubyonrails.org)
27-
- **PostgreSQL**: [PostgresSQL 16.3](https://www.postgresql.org)
28-
- **Tailwind CSS**: Uses [Tailwind CSS](https://tailwindcss.com) for styling.
29-
- **Vite Ruby**: Uses [Vite Ruby](https://vite-ruby.netlify.app) for asset management. It is based on [Vite.js](https://vitejs.dev). It replaces webpacker, jsbundling-rails, cssbundling-rails, importmaps and sprockets/propshaft.
30-
- **Bun**: Uses [Bun](https://bun.sh/) as package manager. It replaces Node and Yarn.
31-
- **Phlex**: Uses [Phlex](https://www.phlex.fun) for component-based views. It is an alternative to [ViewComponent](https://viewcomponent.org).
32-
- **Solid Queue**: Uses [Solid Queue](https://github.com/rails/solid_queue) for background processing.
33-
- **Minitest/FactoryBot**: Uses Rails' default testing library, minitest along with [Factorybot](https://github.com/thoughtbot/factory_bot).
34-
- **Rubocop**: Auto-formats Ruby code with [rubocop](https://rubocop.org).
35-
- **Prettier**: Auto-formats JavaScript and CSS code with [prettier](https://prettier.io).
36-
- **Github Actions**: Uses Github Actions for continuous integration and deployment.
37-
- **Deployment**: Supports deployment on [Heroku](https://www.heroku.com/platform) and [Render](https://render.com)
25+
## Key Features
3826

27+
- **Intuitive Interface**: Easy-to-use dashboard for quick overview of all job applications.
28+
- **Detailed Tracking**: Record essential information for each application, including:
29+
- Applied
30+
- Company
31+
- Position
32+
- Postion Type (Full-time, Part-time, Internship)
33+
- Contact Method
34+
- Point of Contact (P.o.C.)
35+
- Email
36+
- Website
37+
- **Dynamic Filtering**: Quickly find specific applications using search and filter options.
38+
- **Real-time Updates**: Leveraging Hotwire for seamless, dynamic content updates without full page reloads.
39+
- **Responsive Design**: Fully functional on both desktop and mobile devices.
3940

40-
## Getting Started 🚀
41+
## Technical Stack
42+
43+
- **Backend**: Ruby on Rails 7
44+
- **Frontend**:
45+
- Tailwind CSS for styling
46+
- Hotwire (Turbo and Stimulus) for dynamic interactions
47+
- Vite for modern JavaScript bundling
48+
- **Database**: PostgreSQL
4149

50+
## Getting Started 🚀
4251

4352
### System Requirements
4453
You will need the following to run the application.
@@ -49,28 +58,6 @@ You will need the following to run the application.
4958

5059
Refer [here](./docs/installing_prerequisites.md) to install these dependencies
5160

52-
### Initial setup
53-
- Shore is a preconfigured base Ruby on Rails application. You can clone this repository and add it to your repo.
54-
```bash
55-
git clone [email protected]:yatish27/shore.git your_new_project_name
56-
cd your_new_project_name
57-
```
58-
59-
- The application's default name is Shore. You can rename it to your desired new name. The name should be in camelcase.
60-
61-
```bash
62-
./bin/rename_project YourNewProjectName
63-
```
64-
65-
- Copy the `env.sample` to `.env`
66-
67-
- The default username and password for database is set to `postgres` and `password`. You can override them in `.env` file.
68-
69-
- Run `bin/setup` to set up the application. It prepares the database and installs the required ruby gems and javascript packages. The script is idempotent, so you can run it multiple times.
70-
71-
```bash
72-
./bin/setup
73-
```
7461

7562
### Running the application
7663

@@ -84,15 +71,23 @@ This runs overmind or foreman using the Procfile.dev. It starts the rails server
8471

8572
Visit `http://localhost:3000` to see the home page 🚀.
8673

87-
### Running locally with docker
88-
Shore supports docker and docker compose for local development.
74+
## Seed Data
75+
76+
To help you get started and test the application's features, I've included a seed file that generates 50 sample job applications. This data is designed to simulate a realistic job search scenario.
77+
78+
```bash
79+
rails db:seed
80+
```
81+
82+
### Running locally with docker
83+
Job Tracker supports docker and docker compose for local development.
8984
Install Docker and Docker desktop,
9085

9186
Once you have cloned the repository and have Docker installed, follow the following steps
9287

9388
- Run `docker compose build` to build. It will build the necessary images.
9489
- Run `docker-compose run --rm web bin/setup` to create and set up the database.
95-
- Run `docker compose up` to start the application.
90+
- Run `docker compose up` to start the application.
9691
Since the local code from your host machine is mounted in the docker container, any change made locally will be directly reflected. You don't need to rebuild the container.
9792

9893
## Deployment 📦
@@ -105,13 +100,28 @@ Running all tests
105100
./bin/rails test:all
106101
```
107102

108-
Running a single test
109-
```
110-
./bin/rails test test/jobs/hello_world_job_test.rb
111-
```
112-
113103
## License 🔑
114-
Shore is released under the [MIT License](./LICENSE.txt).
104+
JobTracker is released under the [MIT License](./LICENSE.txt).
105+
115106

116107
## Contributing 🤝
117-
PRs are welcome
108+
109+
**Contributions Welcome:** I'm open to contributions! If you'd like to help improve this project:
110+
111+
1. Fork the repository
112+
2. Create a new branch for your feature or bug fix
113+
3. Make your changes and commit them with clear, descriptive messages
114+
4. Push your changes to your fork
115+
5. Create a pull request with a detailed description of your changes
116+
117+
I appreciate all contributions, big or small. Let's build something great together! 🚀
118+
119+
🚧 **Note:** This project is currently under active development and is very much a work in progress. Features may change.
120+
121+
## Acknowledgements
122+
123+
This project was built upon the foundation provided by [Shore](https://github.com/yatish27/shore), a Ruby on Rails template with a modern stack for starting new projects. I express my gratitude to the Shore project for providing an excellent starting point.
124+
125+
> Shore is a Ruby on Rails template with modern stack to start your new project.
126+
127+
I highly recommend checking out the Shore project for anyone looking to kickstart their Ruby on Rails development with a modern, well-structured template.

app/controllers/home_controller.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
class JobApplicationsController < ApplicationController
2+
before_action :set_job_application, only: [:create, :update, :destroy]
3+
4+
def index
5+
@job_applications = JobApplication.all
6+
7+
if params[:search].present?
8+
@job_applications = @job_applications.where("company_name ILIKE ? OR position_title ILIKE ?", "%#{params[:search]}%", "%#{params[:search]}%")
9+
end
10+
11+
if params[:method_of_contact].present?
12+
@job_applications = @job_applications.where(method_of_contact: params[:method_of_contact])
13+
end
14+
15+
if params[:position_type].present?
16+
@job_applications = @job_applications.where(position_type: params[:position_type])
17+
end
18+
19+
@job_application_count = @job_applications.count
20+
21+
@job_applications = if params[:sort].present? && params[:direction].present?
22+
@job_applications.order(params[:sort] => params[:direction])
23+
else
24+
@job_applications.order(date_applied: :desc)
25+
end
26+
27+
@job_applications = @job_applications.paginate(page: params[:page], per_page: 10)
28+
29+
respond_to do |format|
30+
format.html
31+
format.turbo_stream
32+
end
33+
end
34+
35+
def new
36+
@job_application = JobApplication.new
37+
end
38+
39+
def create
40+
@job_application = JobApplication.new(job_application_params)
41+
42+
respond_to do |format|
43+
if @job_application.save
44+
format.html { redirect_to job_applications_path, notice: "Job application was successfully created." }
45+
format.turbo_stream {
46+
flash.now[:notice] = "Job application was successfully created."
47+
render turbo_stream: [
48+
turbo_stream.prepend("job_applications", partial: "job_application", locals: {job_application: @job_application}),
49+
turbo_stream.update("flash_messages", partial: "flash_messages"),
50+
turbo_stream.replace("new_job_application", partial: "form", locals: {job_application: JobApplication.new})
51+
]
52+
}
53+
else
54+
format.html { render :new, status: :unprocessable_entity }
55+
format.turbo_stream { render turbo_stream: turbo_stream.replace(@job_application, partial: "form", locals: {job_application: @job_application}) }
56+
end
57+
end
58+
end
59+
60+
def update
61+
respond_to do |format|
62+
if @job_application.update(job_application_params)
63+
format.html { redirect_to job_applications_path, notice: "Job application was successfully updated." }
64+
format.turbo_stream {
65+
flash.now[:notice] = "Job application was successfully updated."
66+
render turbo_stream: [
67+
turbo_stream.replace(@job_application, partial: "job_application", locals: {job_application: @job_application}),
68+
turbo_stream.update("flash_messages", partial: "flash_messages")
69+
]
70+
}
71+
else
72+
format.html { render :edit, status: :unprocessable_entity }
73+
format.turbo_stream { render turbo_stream: turbo_stream.replace(@job_application, partial: "form", locals: {job_application: @job_application}) }
74+
end
75+
end
76+
end
77+
78+
def destroy
79+
@job_application.destroy
80+
respond_to do |format|
81+
format.html { redirect_to job_applications_url, notice: "Job application was successfully deleted." }
82+
format.turbo_stream {
83+
flash.now[:notice] = "Job application was successfully deleted."
84+
render turbo_stream: [
85+
turbo_stream.remove(@job_application),
86+
turbo_stream.update("job_application_count", JobApplication.count),
87+
turbo_stream.update("flash_messages", partial: "flash_messages")
88+
]
89+
}
90+
end
91+
end
92+
93+
private
94+
95+
def set_job_application
96+
@job_application = JobApplication.find(params[:id])
97+
end
98+
99+
def job_application_params
100+
params.require(:job_application).permit(:date_applied, :company_name, :method_of_contact, :email_address, :point_of_contact, :website_link, :position_type, :position_title)
101+
end
102+
end
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Controller } from '@hotwired/stimulus';
2+
3+
export default class extends Controller {
4+
connect() {
5+
if (this.element.innerHTML.trim() !== '') {
6+
this.show();
7+
}
8+
}
9+
10+
show() {
11+
this.element.classList.remove('hidden');
12+
setTimeout(() => {
13+
this.element.classList.add('hidden');
14+
}, 5000);
15+
}
16+
}

app/frontend/controllers/hello_controller.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Controller } from "@hotwired/stimulus";
2+
3+
export default class extends Controller {
4+
static targets = ['count'];
5+
6+
update(event) {
7+
this.countTarget.textContent = event.detail.count;
8+
}
9+
}

0 commit comments

Comments
 (0)