jira-pat 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,135 +1,120 @@
1
1
  # Jira Dashboard
2
2
 
3
- A fast, lightweight, and modern Jira Dashboard built with React, Vite, and Node.js. It avoids CORS and proxy issues by connecting directly to the Jira Cloud API using Basic Authentication within a dedicated Express backend.
4
-
5
- ## Features
6
-
7
- 1. **Direct Jira Cloud Integration**: Connects to the Jira REST API securely via an Express backend.
8
- 2. **CLI Configuration**: Easy setup with the built-in `jira` CLI tool.
9
- 3. **Dynamic Filtering**: Filter by project, status, or keyword.
10
- 4. **Interactive Issue View**:
11
- - Full issue details in a side drawer or standalone page.
12
- - Rich text rendering (Markdown/ADF to HTML).
13
- - Proxying of Jira-hosted images and attachments.
14
- - Status transitions and user assignment.
15
- - File uploads directly to Jira tickets.
16
- 5. **Subtasks & Linked Issues**: Visualize and navigate between related tickets.
17
- 6. **Backend Caching**: 60-second in-memory caching for performance and API rate-limiting compliance.
18
- 7. **Fully Tested**: Comprehensive unit and integration tests for both frontend and backend.
19
- 8. **Error Handling**: Robust error boundaries and toast notifications for a smooth experience.
3
+ View and manage your Jira tickets from a simple dashboard no need to navigate Jira itself.
20
4
 
21
5
  ---
22
6
 
23
- ## Getting Started
7
+ ## Before You Begin
24
8
 
25
- ### Prerequisites
9
+ You'll need three things set up before you can use the dashboard. This only takes about 5 minutes.
26
10
 
27
- - Node.js (v18 or higher recommended)
28
- - An Atlassian account with a Jira Cloud instance
29
- - A Jira API Token ([Get one here](https://id.atlassian.com/manage-profile/security/api-tokens))
11
+ ### 1. Node.js (a behind-the-scenes engine)
30
12
 
31
- ### Installation & Setup
13
+ The dashboard needs Node.js installed on your computer to run. You don't need to know what it does — just think of it as a required engine.
32
14
 
33
- 1. **Download & Install**:
34
- ```bash
35
- git clone https://github.com/yourusername/jira-dashboard.git
36
- cd jira-dashboard
37
- npm install
38
- ```
15
+ **Check if you already have it:**
16
+ 1. Open **Terminal** (Mac) or **Command Prompt** (Windows)
17
+ - Mac: Press `Cmd + Space`, type *Terminal*, hit Enter
18
+ - Windows: Press `Win + R`, type *cmd*, hit Enter
19
+ 2. Type `node --version` and press Enter
20
+ 3. If you see something like `v18.0.0` or higher, you're all set ✅
39
21
 
40
- 2. **Configure your Account**:
41
- Run the setup tool to connect your Jira account:
42
- ```bash
43
- npm link # Optional: allows you to just type 'jira'
44
- jira config
45
- ```
46
- Follow the prompts to enter your **Jira URL**, **Email**, and **API Token**.
47
-
48
- 3. **Launch the App**:
49
- ```bash
50
- npm start
51
- ```
52
- Your browser should automatically open to `http://localhost:5000`.
22
+ **If you don't have it:**
23
+ 1. Go to [nodejs.org](https://nodejs.org)
24
+ 2. Click the big **"LTS"** download button (LTS = most stable version)
25
+ 3. Install it like any other program
26
+ 4. Close and reopen your Terminal window before continuing
53
27
 
54
28
  ---
55
29
 
56
- ## Using the Dashboard (User Guide)
30
+ ### 2. A Jira API Token (your secure password for the app)
31
+
32
+ Instead of using your Jira password directly, you'll create a special token just for this app. It's safer and easy to remove if needed.
57
33
 
58
- Once the dashboard is open, here is how you can manage your work:
34
+ **How to create one:**
35
+ 1. Go to [Atlassian API Token page](https://id.atlassian.com/manage-profile/security/api-tokens)
36
+ 2. Click **"Create API token"**
37
+ 3. Give it any name — for example, *Jira Dashboard*
38
+ 4. Click **"Create"**, then **copy the token** that appears
39
+ 5. Paste it somewhere safe (like a note on your computer) — you'll need it in the next section and **won't be able to see it again**
59
40
 
60
- ### 1. Finding Your Work
61
- * **Default View**: When you log in, you will see all issues currently assigned to you.
62
- * **Search**: Use the search bar at the top to find specific tickets by typing their title or description. (Tip: Press `/` to jump to search).
63
- * **Filters**: Use the **Project** and **Status** dropdowns to narrow down your list (e.g., only show "In Progress" tasks for project "ABC").
41
+ ---
64
42
 
65
- ### 2. Viewing and Updating Issues
66
- * **Open Details**: Click on any row in the table. A side panel will slide out with the full description and comments.
67
- * **Change Status**: Inside the panel, click the status button (like "To Do") to move the ticket to a new stage (like "Done").
68
- * **Reassign**: Click the user's name or avatar to search for and assign the ticket to someone else.
69
- * **Add Attachments**: Drag and drop files directly onto the "Upload" area in the side panel to add them to the Jira ticket.
43
+ ### 3. Your Jira URL
70
44
 
71
- ### 3. Creating New Issues
72
- * Click the blue **+** button in the top right corner.
73
- * Select the **Project** and **Issue Type** (e.g., Task, Bug).
74
- * Enter a **Summary** and click **Create**. The ticket is instantly added to your Jira instance.
45
+ This is the web address you normally type to get to Jira at work. It usually looks like one of these:
46
+ - `https://yourcompany.atlassian.net`
47
+ - `https://jira.yourcompany.com`
75
48
 
76
49
  ---
77
50
 
78
- ## Development (Technical)
51
+ ## Setup & Launch
79
52
 
80
- ### Running the Backend (API)
81
- ```bash
82
- cd backend
83
- npm start
84
- ```
85
- The API runs on `http://localhost:5000`.
53
+ ### Step 1 — Run the one-time setup
86
54
 
87
- ### Running the Frontend (Vite)
55
+ Open Terminal (or Command Prompt) and paste this, then press Enter:
88
56
  ```bash
89
- cd frontend
90
- npm run dev
57
+ npx jira-pat config
91
58
  ```
92
- The frontend runs on `http://localhost:5173` (proxies `/api` to port 5000).
59
+
60
+ It will ask you for three things:
61
+ - **Jira URL** — the address from Step 3 above
62
+ - **Email** — the email you use to log into Jira
63
+ - **API Token** — the token you created in Step 2
64
+
65
+ > 🔒 Your details are saved only on your computer and are never sent anywhere else.
66
+
67
+ **Where your details are saved (for your reference):**
68
+ - Mac/Linux: `~/.jira-dashboard-config.json`
69
+ - Windows: `C:\Users\YourName\.jira-dashboard-config.json`
93
70
 
94
71
  ---
95
72
 
96
- ## Testing
73
+ ### Step 2 — Start the dashboard
97
74
 
98
- ### Run All Tests
75
+ Each time you want to use the dashboard, run:
99
76
  ```bash
100
- npm test
77
+ npx jira-pat
101
78
  ```
102
79
 
103
- ### Backend Tests
104
- ```bash
105
- cd backend
106
- npm test
80
+ Your browser should open automatically. If it doesn't, open your browser and go to:
107
81
  ```
108
-
109
- ### Frontend Tests
110
- ```bash
111
- cd frontend
112
- npm test
82
+ http://localhost:5173
113
83
  ```
114
84
 
115
85
  ---
116
86
 
117
- ## Project Structure
87
+ ## Using the Dashboard
118
88
 
119
- ```
120
- jira-dashboard/
121
- ├── bin/ # CLI setup and start scripts
122
- ├── backend/ # Node.js + Express API Layer
123
- │ ├── routes/ # API Endpoints (Issues, Projects)
124
- │ ├── service/ # Jira API integration logic
125
- │ └── __tests__/ # Backend test suite
126
-
127
- └── frontend/ # React + Vite UI
128
- ├── src/
129
- │ ├── components/ # React components (Table, Drawer, Modals)
130
- │ ├── hooks/ # Custom React hooks (Data fetching, UI state)
131
- │ └── __tests__/ # Frontend test suite
132
- ```
89
+ ### Finding your tickets
90
+
91
+ - When you open the dashboard, you'll see all tickets currently assigned to you.
92
+ - Use the **search bar** at the top to look up a ticket by keyword. Tip: press `/` on your keyboard to jump straight to it.
93
+ - Use the **Project** and **Status** dropdowns to filter the list down to what you need.
94
+
95
+ ### Viewing and updating a ticket
96
+
97
+ - **Click any row** to open a side panel with the full details.
98
+ - **Change the status** by clicking the status label (e.g. *In Progress*, *Done*).
99
+ - **Reassign** a ticket by clicking the assignee's name and searching for someone else.
100
+ - **Attach a file** by dragging and dropping it onto the side panel.
101
+
102
+ ### Creating a new ticket
103
+
104
+ 1. Click the blue **+** button in the top-right corner.
105
+ 2. Choose a **Project** and **Issue Type** (Task, Bug, Story, etc.).
106
+ 3. Write a short **Summary** and click **Create**.
107
+
108
+ ---
109
+
110
+ ## Something Not Working?
111
+
112
+ | What you're seeing | What to try |
113
+ |--------------------|-------------|
114
+ | *"command not found"* | Node.js isn't installed — go back to Step 1 |
115
+ | *"Cannot connect to Jira"* | Check your Jira URL, email, and API token — run `npx jira-pat config` again |
116
+ | *"Port already in use"* | Close other apps or browser tabs that might be using ports 5000 or 5173 |
117
+ | Browser doesn't open | Manually go to `http://localhost:5173` in your browser |
133
118
 
134
119
  ---
135
120
 
package/backend/index.js CHANGED
@@ -46,18 +46,28 @@ app.get('/api/health', (req, res) => {
46
46
  });
47
47
 
48
48
  // Serve frontend static files
49
- const frontendDist = path.join(__dirname, '../frontend/dist');
49
+ const frontendDist = path.resolve(__dirname, '..', 'frontend', 'dist');
50
+ console.log('--- Static Assets Setup ---');
51
+ console.log('Searching for frontend at:', frontendDist);
52
+
50
53
  if (require('fs').existsSync(frontendDist)) {
51
- console.log('Serving frontend from:', frontendDist);
54
+ console.log('✅ Frontend dist found. Serving static files.');
52
55
  app.use(express.static(frontendDist));
53
56
 
54
- // Catch-all for SPA: If no other route matches (and it's not an API call), serve index.html
55
57
  app.use((req, res, next) => {
56
58
  if (!req.path.startsWith('/api') && req.method === 'GET') {
57
- return res.sendFile(path.join(frontendDist, 'index.html'));
59
+ const indexPath = path.resolve(frontendDist, 'index.html');
60
+ if (require('fs').existsSync(indexPath)) {
61
+ return res.sendFile(indexPath);
62
+ } else {
63
+ console.error('❌ Error: index.html not found even though dist exists!');
64
+ return res.status(404).send('Dashboard files missing (index.html)');
65
+ }
58
66
  }
59
67
  next();
60
68
  });
69
+ } else {
70
+ console.warn('⚠️ Warning: frontend/dist directory NOT found at ' + frontendDist);
61
71
  }
62
72
 
63
73
  app.listen(PORT, () => {
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "jira-pat",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Jira Dashboard",
5
5
  "author": "Rohith",
6
+ "license": "ISC",
6
7
  "workspaces": [
7
8
  "backend",
8
9
  "frontend"
@@ -20,6 +21,7 @@
20
21
  "test": "npm run test --workspace backend && npm run test:run --workspace frontend"
21
22
  },
22
23
  "bin": {
24
+ "jira-pat": "./bin/jira.js",
23
25
  "jira": "./bin/jira.js",
24
26
  "jira-config": "./bin/jira.js",
25
27
  "jira-update": "./bin/jira.js"