# IAM3 Monorepo
This monorepo contains the complete implementation of a decentralized identity system, including authentication services, DID resolution, credential issuance, and a frontend application.
## Project Structure
```shell
iam3-monorepo/
├── services/
│ ├── iam3/ # Main IAM3 service
│ ├── resolver/ # DID Resolver service
│ └── issuer/ # Credential Issuer service
├── shared/ # Shared Go packages
│ └── models/
├── frontend/ # Next.js frontend application
├── scripts/ # Build and deployment scripts
└── docker-compose.yml # Docker Compose configuration
- IAM3 system. Here's a breakdown of the components:
- Client Browser and Frontend App: The user interface layer.
- API Gateway: Handles incoming requests and routes them to appropriate services.
- IAM3 Service: Manages authentication and token issuance.
- Resolver Service: Handles DID resolution.
- Issuer Service: Issues verifiable credentials.
- Shared Components: Common code and models used across services.
- External Services: Iden3 Network, EVM Wallet, and Social Auth providers.
+---------------------+ +---------------------+
| | | |
| Client Browser | | Frontend App |
| | | (Next.js) |
+----------+----------+ +---------+-----------+
| |
| HTTP/HTTPS |
| |
+----------v-----------------------------v-----------+
| |
| API Gateway |
| |
+----+----------------------+----------------------+-+
| | |
| | |
+----v----+ +----v----+ +----v----+
| | | | | |
| IAM3 | |Resolver | | Issuer |
| Service | | Service | | Service |
| | | | | |
+----+----+ +----+----+ +----+----+
| | |
| | |
+----v----------------------v----------------------v----+
| |
| Shared Components |
| (Models, Utilities, Interfaces) |
| |
+------------------------------------------------------+
| | |
| | |
+----v----+ +----v----+ +----v----+
| | | | | |
| Iden3 | | EVM | | Social |
| Network | | Wallet | | Auth |
| | | | | |
+---------+ +---------+ +---------+
-
IAM3 Service: Handles authentication and token issuance.
- Supports Iden3, EVM wallet, X (Twitter), and Discord authentication methods.
- Implements OIDC-compliant flows.
-
Resolver Service: Resolves Decentralized Identifiers (DIDs).
- Supports multiple DID methods.
-
Issuer Service: Issues verifiable credentials.
-
Frontend: Next.js application for user interaction.
- Go 1.17 or later
- Node.js 14 or later
- Docker and Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/iam3-monorepo.git cd iam3-monorepo
-
Build and start all services:
docker-compose up --build
-
Access the frontend at
http://localhost:3000
Each service in the services/
directory can be developed independently:
cd services/iam3
go run cmd/server/main.go
To develop the frontend:
cd frontend
npm install
npm run dev
Run tests for all services:
./scripts/test.sh
Or test individual services:
cd services/iam3
go test ./...
For frontend tests:
cd frontend
npm test
The project is configured for deployment using Docker. Use the provided docker-compose.yml
for orchestration.
For production deployment, consider using Kubernetes or a similar container orchestration system.
Each service has its own configuration file. Update these files in the respective service directories as needed.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE.md file for details.