A modern database management interface built with React, TypeScript, and AWS Cloudscape Design System.
- Browse database tables in NeonDB and DynamoDB
- View and filter table records/items
- Create, update, and delete records
- Responsive design using AWS Cloudscape Design System
- Type-safe development with TypeScript
- Multi-database support with unified interface
- Node.js 14+ and npm
- AWS credentials configured for DynamoDB access (if using DynamoDB)
-
Clone the repository:
git clone https://github.com/akkasali910/database-explorer.git cd database-explorer -
Install dependencies:
npm install -
Configure AWS credentials for DynamoDB:
- For local development, set up your AWS credentials in
~/.aws/credentials - For production, use environment variables or IAM roles
Environment variables are automatically injected by Create React App when they are prefixed with REACT_APP_.
Just use them directly:
- For local development, set up your AWS credentials in
// At the top of dynamoDbService.ts, after imports
// Configure AWS SDK with environment variables
AWS.config.update({
region: process.env.REACT_APP_AWS_REGION || 'us-east-1',
credentials: {
accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID || '',
secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY || ''
}
});
No additional imports are needed.
-
Start the development server:
npm start -
Open http://localhost:3000 to view it in the browser.
The application connects to a REST API at:
https://xxxxxxxxxx.execute-api.eu-west-1.amazonaws.com/api/explorer
To use a different API, update the API_BASE_URL in src/services/dataService.ts.
DynamoDB access is configured through the AWS SDK. You can set up your AWS credentials in several ways:
- Local development: Create or edit
~/.aws/credentialsfile:
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
region = us-east-1
- Environment variables:
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
export AWS_REGION=us-east-1I've implemented a complete DynamoDB Explorer feature for the tables-explorer application. Here's what I've added:
- DynamoDB Service:
-
Created dynamoDbService.ts with functions to interact with DynamoDB tables
-
Implemented table listing, schema retrieval, and CRUD operations for records
- Database Selection:
-
Added DatabaseSelector.tsx component to switch between NeonDB and DynamoDB
-
Updated TablesExplorer.tsx to conditionally render the appropriate components
- DynamoDB Components:
-
DynamoDbTablesList.tsx: Lists all DynamoDB tables
-
DynamoDbRecordsList.tsx: Shows items in a selected DynamoDB table
-
DynamoDbRecordDetails.tsx: Displays and allows editing of DynamoDB items
- AWS Credentials Management:
-
Added AwsCredentialsModal.tsx for configuring AWS credentials
-
Integrated with AWS SDK to update credentials at runtime
- Type Updates:
-
Extended types.ts to include DynamoDB-specific fields
-
Added support for DynamoDB data types
The implementation follows the same design patterns as the existing NeonDB explorer, providing a consistent user experience while supporting the unique features of DynamoDB. Users can now:
-
Switch between NeonDB and DynamoDB using the database selector
-
Configure AWS credentials for DynamoDB access
-
Browse DynamoDB tables and view their items
-
Create, update, and delete items in DynamoDB tables
This implementation maintains the clean separation of concerns in the codebase, with separate components and services for each database type, while sharing common UI elements and patterns.
src/components/: React componentssrc/services/: API and data servicesdataService.ts: NeonDB API servicedynamoDbService.ts: DynamoDB service
src/types/: TypeScript interfacessrc/utils/: Utility functions
TablesExplorer: Main component that orchestrates the applicationDatabaseSelector: Allows switching between NeonDB and DynamoDBTablesList/DynamoDbTablesList: Displays available database tablesRecordsList/DynamoDbRecordsList: Shows records in a selected tableRecordDetails/DynamoDbRecordDetails: Displays and allows editing of a record
- Start the application with
npm start - Select the database type (NeonDB or DynamoDB) from the selector
- Browse tables in the selected database
- Click on a table to view its records/items
- Click on a record to view or edit its details
MIT License
