Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
24 changes: 24 additions & 0 deletions Application-page-main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
Comment on lines +13 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add .env patterns and Vercel dir to prevent secrets leakage.

You have *.local, but .env and non-.local variants can still get committed. Also ignore Vercel’s local folder.

 *.local

+# Environment files
+.env
+.env.*.local
+.env.local
+.env.development
+.env.production
+.env.test
+!.env.example
+
+# Vercel
+.vercel
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
*.local
# Editor directories and files
*.local
# Environment files
.env
.env.*.local
.env.local
.env.development
.env.production
.env.test
!.env.example
# Vercel
.vercel
# Editor directories and files
🤖 Prompt for AI Agents
In Application-page-main/.gitignore around lines 13 to 15, the ignore list only
has '*.local' so plain '.env' files and other env variants and Vercel's local
folder can still be committed; update the .gitignore to add entries for '.env'
and all env variants (e.g. '.env*' or '.env.*' depending on preference) and add
'.vercel/' (or 'vercel/' if used) to prevent leaking secrets and Vercel config;
after updating, ensure any already-tracked secret files are removed from git
history or untracked with 'git rm --cached' as needed.

.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
177 changes: 177 additions & 0 deletions Application-page-main/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Application Console

A comprehensive, reusable application management console built with React and AWS Cloudscape Design System. This application can handle both organization and event applications with a scalable, maintainable architecture.

## Features

### 🎯 Core Functionality
- **Dual Application Types**: Supports both organization and event applications
- **Comprehensive Table View**: Sortable, filterable, and paginated application listing
- **Detailed Application View**: Complete application details with tabbed interface
- **Status Management**: Approve/reject applications with reason tracking
- **Comment System**: Add and view comments on applications
- **File Management**: Upload and download files for each application
- **Responsive Design**: Mobile-friendly interface using Cloudscape Design System

### 🏗️ Architecture
- **Reusable Components**: Built for scalability and maintainability
- **Mock API Layer**: Simulated API calls with realistic data structure
- **Type-based Routing**: URL parameters for different application types
- **State Management**: React hooks for efficient state handling
- **Error Handling**: Comprehensive error states and loading indicators

## Technology Stack

- **React 18** - Modern React with hooks
- **AWS Cloudscape Design System** - Professional UI components
- **React Router DOM** - Client-side routing
- **Vite** - Fast build tool and dev server
- **Tailwind CSS** - Utility-first CSS framework

## Getting Started

### Prerequisites
- Node.js (v16 or higher)
- npm or yarn

Comment on lines +33 to +36
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Correct Node.js version (Vite 5 needs ≥18).

Running with Node 16 will fail. Update prereqs to Node 18+.

- - Node.js (v16 or higher)
+ - Node.js (v18 or higher)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Prerequisites
- Node.js (v16 or higher)
- npm or yarn
### Prerequisites
- Node.js (v18 or higher)
- npm or yarn
🤖 Prompt for AI Agents
In Application-page-main/README.md around lines 33 to 36, the Node.js version
prerequisite is incorrect for Vite 5 (lists v16); update the prereqs to require
Node.js v18 or higher and mention npm or yarn as before so readers know Vite 5
needs Node 18+ to run successfully.

### Installation

1. Clone the repository
2. Navigate to the project directory
3. Install dependencies:
```bash
npm install
```

4. Start the development server:
```bash
npm run dev
```

5. Open your browser and navigate to `http://localhost:5173`

## Project Structure

```
src/
├── Pages/
│ ├── ApplicationConsole.jsx # Main application listing page
│ └── ApplicationDetails.jsx # Detailed application view
├── data/
│ └── Mock.js # Mock API and sample data
├── App.jsx # Main app component with routing
├── main.jsx # Entry point with theming
└── index.css # Global styles
```

## Usage

### Application Console
- **Switch Types**: Use the dropdown to switch between organization and event applications
- **Search**: Filter applications by name, applicant, or ID
- **View Details**: Click on an application ID or use the "View Selected" button
- **Pagination**: Navigate through large lists of applications

### Application Details
- **Details Tab**: View application information and form responses
- **Comments Tab**: Add comments and view comment history
- **Files Tab**: Upload and download files
- **Status Management**: Approve or reject applications with optional reasons

## API Contract

The application follows a defined API contract structure:

### Application Object
```javascript
{
id: string,
name: string,
status: 'pending' | 'approved' | 'rejected',
submittedAt: string (ISO date),
type: 'organization' | 'event',
applicantEmail: string,
applicantName: string,
organizationName: string,
formResponse: object,
comments: array,
files: array,
createdAt: string (ISO date),
updatedAt: string (ISO date)
}
```

### Mock API Functions
- `getOrganizationApplications()` - Get pending organization applications
- `getEventApplications()` - Get all event applications
- `getApplicationById(id)` - Get specific application details
- `updateApplicationStatus(id, status, comment)` - Update application status
- `addComment(id, comment)` - Add comment to application
- `uploadFile(id, file)` - Upload file for application
- `downloadFile(fileId)` - Download file

## Customization

### Adding New Application Types
1. Add new data structure to `Mock.js`
2. Update the API functions
3. Modify the type switching logic in `ApplicationConsole.jsx`

### Styling
- Global styles: `src/index.css`
- Cloudscape theming: `src/main.jsx`
- Component-specific styles use Cloudscape Design System tokens

### Form Response Rendering
The application automatically renders form responses as key-value pairs. For more sophisticated rendering:
1. Modify the `renderFormResponse()` function in `ApplicationDetails.jsx`
2. Add type-specific rendering logic

## Development

### Available Scripts
- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run preview` - Preview production build
- `npm run lint` - Run ESLint

### Code Style
- ESLint configuration included
- Prettier recommended for code formatting
- Follow React best practices and hooks patterns

## Deployment

1. Build the application:
```bash
npm run build
```

2. Deploy the `dist` folder to your hosting service

3. Configure your web server to serve `index.html` for all routes (SPA routing)

## Browser Support

- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

## License

This project is licensed under the MIT License.

## Acknowledgments

- AWS Cloudscape Design System for the excellent component library
- React team for the amazing framework
- Vite team for the fast build tool
38 changes: 38 additions & 0 deletions Application-page-main/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions Application-page-main/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Application page</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading
Loading