This project is an Issue Tracker Application built with Next.js and Tailwind CSS. It allows users to create, view, and update issues, complete with authentication and authorization via NextAuth.
- User authentication with NextAuth
- Create new issues
- View a list of all issues
- Update issue status
- Responsive design with Tailwind CSS
- Next.js
- React
- Tailwind CSS
- NextAuth for authentication
- Prisma for database ORM
- Axios for API requests
Ensure you have the following installed on your machine:
- Node.js (>=14.x)
- npm or yarn
- A PostgreSQL database (or another Prisma-supported database)
-
Clone the repository:
git clone https://github.com/yourusername/issue-tracker.git cd issue-tracker
-
Install dependencies:
npm install # or yarn install
-
Set up your environment variables:
Create a
.env.local
file in the root directory and add the following variables:DATABASE_URL="your-database-url" NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret GOOGLE_ID=your-google-id GOOGLE_SECRET=your-google-secret
-
Set up the database:
npx prisma migrate dev --name init
-
Start the development server:
npm run dev # or yarn dev
Your application should now be running on http://localhost:3000.
- Navigate to the "Create Issue" page.
- Fill out the form with the necessary details (Test Case Name, Test Description, Estimated Time, Module, Priority).
- Click the "Submit" button to create the issue.
- Navigate to the "Issues" page.
- View the list of all issues with their details.
- On the "Issues" page, select a status (PASS/FAIL) from the dropdown for the desired issue.
- The status will be updated in the database.
- GET
/api/getIssues
: Fetches all issues from the database. - POST
/api/createIssue
: Creates a new issue in the database. - PUT
/api/updateIssueStatus
: Updates the status of an existing issue.
CreateIssue
: Component for creating a new issue.IssueList
: Component for listing all issues.IssueItem
: Component for individual issue item.
index.tsx
: Home page.Issuecreation.tsx
: Page for creating an issue.Issues.tsx
: Page for viewing all issues.
Tailwind CSS is used for styling components.
NextAuth is used for authentication. Users can sign in with their Google accounts.
- Fork the repository.
- Create a new branch:
git checkout -b my-feature-branch
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-feature-branch
- Submit a pull request.
This project is licensed under the MIT License.