A web application marketplace for buying and selling datasets with integrated payment processing (Stripe, Klarna, Nano cryptocurrency).
datasets-exchange/
├── backend/ # ASP.NET Core Web API
│ ├── src/
│ │ ├── DatasetMarketplace.API/ # API Layer
│ │ ├── DatasetMarketplace.Application/ # Application Layer (Services, DTOs)
│ │ ├── DatasetMarketplace.Domain/ # Domain Layer (Entities, Enums)
│ │ └── DatasetMarketplace.Infrastructure/ # Infrastructure Layer (Database, Repositories)
│ └── tests/
│ ├── DatasetMarketplace.UnitTests/
│ └── DatasetMarketplace.IntegrationTests/
├── frontend/ # Angular 17+ Application
│ └── src/
│ └── app/
│ ├── core/ # Core services, guards, interceptors
│ ├── shared/ # Shared components
│ └── features/ # Feature modules
└── PROJECT_PLAN.md # Comprehensive project plan
- Framework: ASP.NET Core 8.0
- Language: C# (.NET 8)
- Database: PostgreSQL 15+
- ORM: Entity Framework Core 8.0
- Authentication: JWT (JSON Web Tokens)
- API Documentation: Swagger/OpenAPI
- Framework: Angular 17+
- Language: TypeScript 5+
- HTTP Client: Angular HttpClient with interceptors
- Forms: Reactive Forms
- Styling: SCSS
✅ Completed Features:
- Clean Architecture project structure
- Domain entities (User, Dataset, Transaction, Category, Reviews, etc.)
- Entity Framework Core configuration
- PostgreSQL database configuration
- Repository pattern with Unit of Work
- JWT authentication service
- Auth controller (Register, Login, Password Reset)
- Swagger documentation setup
- CORS configuration for Angular
- Angular 17 project with standalone components
- Core services (AuthService, ApiService)
- HTTP interceptors (Auth, Error)
- Route guards (AuthGuard)
- Login component
- Register component
- Marketplace component (placeholder)
- Lazy-loaded feature modules
- Environment configuration
- .NET 8 SDK - Download
- Node.js 18+ and npm - Download
- PostgreSQL 15+ - Download
- Angular CLI -
npm install -g @angular/cli
Create a PostgreSQL database:
CREATE DATABASE dataset_marketplace;Navigate to the backend API project:
cd backend/src/DatasetMarketplace.APIUpdate the connection string in appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=dataset_marketplace;Username=your_username;Password=your_password"
}
}Run database migrations:
dotnet ef migrations add InitialCreate --project ../DatasetMarketplace.Infrastructure
dotnet ef database updateRun the API:
dotnet runThe API will be available at:
- HTTP:
http://localhost:5000 - HTTPS:
https://localhost:5001 - Swagger UI:
http://localhost:5000/swagger
Navigate to the frontend directory:
cd frontendInstall dependencies:
npm installUpdate the API URL in src/environments/environment.ts if needed:
export const environment = {
production: false,
apiUrl: 'http://localhost:5000'
};Run the Angular development server:
ng serveThe app will be available at http://localhost:4200
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register a new user |
| POST | /api/auth/login |
Login with email/password |
| POST | /api/auth/refresh |
Refresh access token |
| GET | /api/auth/verify-email |
Verify email address |
| POST | /api/auth/forgot-password |
Request password reset |
| POST | /api/auth/reset-password |
Reset password |
{
"email": "[email protected]",
"password": "SecurePassword123",
"firstName": "John",
"lastName": "Doe",
"userType": 1
}UserType values:
1= Buyer2= Seller3= Both
- Navigate to
http://localhost:5000/swagger - Try the
/api/auth/registerendpoint to create a user - Try the
/api/auth/loginendpoint to get a JWT token - Click "Authorize" and enter:
Bearer <your-token> - Test protected endpoints
- Navigate to
http://localhost:4200 - Click "Login" or navigate to
/auth/register - Create an account
- Login with your credentials
- You'll be redirected to the marketplace
- Users - User accounts (buyers/sellers)
- Datasets - Dataset listings
- Categories - Dataset categories
- Transactions - Purchase transactions
- DatasetReviews - User reviews and ratings
- DatasetPurchases - Purchase records
- DatasetFiles - Dataset file metadata
- DatasetMetadata - Dataset statistics and schema
- Dataset upload functionality
- Dataset browsing and search
- Dataset preview generation
- File storage service (S3/Azure Blob)
- Seller dashboard
- Buyer dashboard
- Stripe payment integration
- Klarna payment integration
- Nano cryptocurrency payment integration
- Transaction management
- Payout system
The JWT secret key is configured in appsettings.json. Change this in production!
{
"JwtSettings": {
"SecretKey": "YourSuperSecretKeyThatIsAtLeast32CharactersLongForHS256Algorithm",
"Issuer": "DatasetMarketplace",
"Audience": "DatasetMarketplaceUsers",
"ExpiryMinutes": "60"
}
}The backend is configured to accept requests from http://localhost:4200. Update this in production:
// Program.cs
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowAngularApp", policy =>
{
policy.WithOrigins("https://your-production-domain.com")
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});If you encounter database connection errors:
- Ensure PostgreSQL is running
- Verify the connection string in
appsettings.json - Check that the database exists
If you see CORS errors in the browser console:
- Ensure the backend is running
- Verify the CORS policy in
Program.cs - Check that the Angular app is running on port 4200
If authentication fails:
- Check that the JWT secret key is configured
- Verify the token is being sent in the Authorization header
- Check token expiration
Please refer to the PROJECT_PLAN.md for the complete development roadmap and implementation details.
[Add your license information here]