A comprehensive platform for managing and conducting company assessments based on the "DRA - Industry 4.0” Maturity Assessment Framework. This platform allows for tracking of assessments, managing companies, and provides a dashboard for assessors.
- User Authentication: Secure sign-in and sign-up functionality for different user roles.
- Dashboard: An interactive dashboard for assessors and administrators to get an overview of audits and other metrics.
- Company Management: CRUD operations for managing companies.
- Audit Management: Create, update, and track audits for companies.
- Evaluations: Assessors can perform evaluations as part of an audit.
- Reporting: Generate reports based on audit data.
- Notifications: Users receive notifications about important events.
- Framework: Next.js
- Styling: Tailwind CSS
- Database: PostgreSQL
- ORM: Prisma
- Authentication: NextAuth.js
- UI Components: Custom-built components, potentially with a library like Headless UI or Radix.
- Charting: ApexCharts
- Node.js (v20.x or later)
- npm
- PostgreSQL
-
Clone the repository:
git clone <repository-url> cd DRA_Industry_4.0_Assessment_Platform
-
Install dependencies:
npm install
-
Set up the database:
- Create a
.envfile in the root of the project. - Add your database connection string to the
.envfile:DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE" - Run the database migrations:
npx prisma migrate dev
- (Optional) Seed the database with initial data:
npm run prisma:seed
- Create a
-
Run the development server:
npm run dev
The application will be available at
http://localhost:3446.
To run this project, you will need to add the following environment variables to your .env file:
DATABASE_URL: The connection string for your PostgreSQL database.NEXTAUTH_URL: The base URL for your application. For development, this will behttp://localhost:3446.NEXTAUTH_SECRET: A secret key for NextAuth.js. You can generate one usingopenssl rand -hex 32.
This project uses Prisma as the ORM to interact with a PostgreSQL database. The database schema is defined in prisma/schema.prisma.
To apply any changes made to the schema, run:
npx prisma migrate dev --name <migration-name>npm run dev: Runs the app in development mode.npm run build: Builds the app for production.npm run start: Starts a production server.npm run lint: Lints the codebase.npm run prisma:seed: Seeds the database.
The project follows a standard Next.js App Router structure.
src/app/api: API routes for the application.src/app/(admin|assessor|dashboard): Different layouts and pages for user roles.src/components: Reusable React components.src/lib: Utility functions and libraries.prisma: Database schema, migrations, and seed scripts.public: Static assets.