Skip to content

Commit 3f2d3b6

Browse files
authored
chore: readme (#36)
* chore: readme * "chore: update readme" * chore: update * chore: add promise.race * chore: fmt
1 parent 21f8527 commit 3f2d3b6

File tree

6 files changed

+202
-32
lines changed

6 files changed

+202
-32
lines changed

Evently.slnx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<Solution>
2-
<Folder Name="/deploy/">
3-
<Project Path="deploy\Terraform\Terraform.csproj"/>
4-
</Folder>
5-
<Folder Name="/Solution Items/">
6-
<File Path=".editorconfig"/>
7-
<File Path=".gitignore"/>
8-
<File Path="Makefile"/>
9-
<File Path="docker-compose.yml"/>
10-
<File Path=".dockerignore"/>
11-
</Folder>
12-
<Folder Name="/src/">
13-
<Project Path="src\evently.client\evently.client.esproj">
14-
<Configuration Solution="Release|Any CPU" Project="Debug|Any CPU"/>
15-
</Project>
16-
<Project Path="src\Evently.Server\Evently.Server.csproj"/>
17-
</Folder>
18-
<Folder Name="/tests/">
19-
<Project Path="tests\Evently.Server.Test\Evently.Server.Test.csproj"/>
20-
</Folder>
2+
<Folder Name="/deploy/">
3+
<Project Path="deploy\Terraform\Terraform.csproj" />
4+
</Folder>
5+
<Folder Name="/Solution Items/">
6+
<File Path=".editorconfig" />
7+
<File Path=".gitignore" />
8+
<File Path="Makefile" />
9+
<File Path="docker-compose.yml" />
10+
<File Path=".dockerignore" />
11+
<File Path="README.md" />
12+
</Folder>
13+
<Folder Name="/src/">
14+
<Project Path="src\evently.client\evently.client.esproj">
15+
<Configuration Solution="Release|Any CPU" Project="Debug|Any CPU" />
16+
</Project>
17+
<Project Path="src\Evently.Server\Evently.Server.csproj" />
18+
</Folder>
19+
<Folder Name="/tests/">
20+
<Project Path="tests\Evently.Server.Test\Evently.Server.Test.csproj" />
21+
</Folder>
2122
</Solution>

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
dev:
2-
dotnet run --project ./src/Evently.Server/Evently.Server.csproj --launch-profile https
2+
dotnet run --project=src/Evently.Server/Evently.Server.csproj --launch-profile https
33

44
test:
5-
dotnet test ./tests/Evently.Server.Test/VisualPatron.Server.Test.csproj
5+
dotnet test ./tests/Evently.Server.Test/Evently.Server.Test.csproj
66

77
add-migration:
88
dotnet ef migrations add UpdateSeededDates --project=src/Evently.Server --context=AppDbContext --output-dir=Common/Adapters/Data/Migrations

README.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Evently - Event Management Application
2+
3+
A modern, full-stack event management platform built with .NET and React, designed to streamline event organization and management processes.
4+
5+
## 📋 Features
6+
- 🎫 **Event Creation & Management** - Create and manage events with detailed information
7+
- 👥 **User Authentication** - Google OAuth integration
8+
- 📱 **QR Code Support** - Generate and scan QR codes for events
9+
- 🖼️ **Image Management** - Upload and compress event images
10+
- 📊 **Data Export** - Export event data to CSV
11+
- 📧 **Email Notifications** - Automated email system
12+
- 📱 **Progressive Web App** - Mobile-friendly experience
13+
- 🔍 **Advanced Search & Filtering** - Find events easily
14+
15+
16+
## 🚀 Quick Start
17+
18+
### 🌐 Live Demo
19+
Experience Evently in action: [Website](https://ca-evently-prod-sea.graybush-4e3751bc.southeastasia.azurecontainerapps.io/)
20+
21+
### 🐳 Docker (Recommended)
22+
Get up and running in minutes with Docker:
23+
24+
Update your `docker-compose.yml` with your email and Google OAuth Client credentials:
25+
```yaml
26+
environment:
27+
# ... other environment variables ...
28+
Authentication__Google__ClientId: "your-google-client-id"
29+
Authentication__Google__ClientSecret: "your-google-client-secret"
30+
EmailSettings__ActualFrom: "[email protected]"
31+
EmailSettings__SmtpPassword: "your-app-password"
32+
```
33+
34+
Then, run the container:
35+
36+
```bash
37+
# Build and run with Docker Compose
38+
docker-compose up --build
39+
40+
# Access the application
41+
# Website: http://localhost:4000
42+
```
43+
44+
45+
## 🛠 Tech Stack
46+
### ⚙️ Backend
47+
- **Framework**: .NET 9.0 with ASP.NET Core
48+
- **Language**: C# 13.0
49+
- **UI Framework**: Blazor Server components
50+
- **Architecture**: Web API with MVC pattern
51+
52+
### 🎨 Frontend
53+
- **Framework**: React 19
54+
- **Language**: TypeScript 5
55+
- **Routing**: TanStack Router v1
56+
- **State Management**: TanStack React Query v5
57+
- **Styling**: Tailwind CSS 4 with DaisyUI 5
58+
- **Build Tool**: Vite 7
59+
60+
### 🏗️ Infrastructure & DevOps
61+
- **CI/CD**: GitHub Actions
62+
- **Cloud**: Azure
63+
- **IAC**: Terraform
64+
65+
## 🏁 Getting Started
66+
67+
### Prerequisites
68+
- .NET 9.0 SDK
69+
- Node.js (with npm/pnpm)
70+
- Docker (optional)
71+
- pnpm
72+
73+
### Installation
74+
75+
1. **Clone the repository**
76+
```bash
77+
git clone <repository-url>
78+
cd evently
79+
80+
2. **Install dependencies**
81+
```bash
82+
# Backend dependencies (if needed)
83+
dotnet restore
84+
85+
# Frontend dependencies
86+
cd src/evently.client && pnpm install
87+
```
88+
89+
3. **Development Setup**
90+
```bash
91+
# In one terminal
92+
make dev
93+
94+
# In another terminal
95+
cd src/evently.client && pnpm run dev
96+
```
97+
98+
## 🧪 Testing
99+
The project includes a comprehensive testing setup:
100+
- **Testing Framework**: Vitest 3.2.4
101+
- **React Testing**: React Testing Library 16.3.0
102+
- **DOM Testing**: Testing Library DOM 10.4.1
103+
- **User Interaction Testing**: User Event 14.6.1
104+
105+
Run tests:
106+
``` bash
107+
# Backend tests
108+
dotnet test tests/Evently.Server.Test/
109+
110+
# Frontend tests
111+
cd src/evently.client && pnpm test
112+
```
113+
114+
115+
## 🔧 Development
116+
### Code Quality
117+
The project maintains high code quality standards with:
118+
- **ESLint**: JavaScript/TypeScript linting
119+
- **Prettier**: Code formatting
120+
- **EditorConfig**: Consistent coding styles
121+
- **TypeScript**: Strong typing for frontend
122+
123+
### Build Tools
124+
- **Vite**: Fast development server and build tool
125+
- **Makefile**: Standardized build commands
126+
- **Docker Compose**: Development environment orchestration
127+
128+
### 📁 Project Structure
129+
The project follows a **Feature Folder Structure** or **Vertical Slice Architecture** pattern,
130+
organizing code by business features rather than technical layers. This approach encourages modularity and separation of concerns.
131+
132+
```
133+
evently/
134+
├── src/ # Source code
135+
│ ├── evently.client/ # React frontend application
136+
│ │ └── src/
137+
│ │ ├── routes/ # Route-based feature organization
138+
│ │ │ ├── login/ # Authentication features
139+
│ │ │ ├── bookings/ # Booking management features
140+
│ │ │ ├── gatherings/ # Event/gathering management features
141+
│ │ │ ├── healthcheck/ # System health monitoring
142+
│ │ │ └── ...
143+
│ │ └── lib/ # Shared utilities and components
144+
│ └── Evently.Server/ # .NET backend application
145+
│ └── Common/ # Shared utilities and infrastructure
146+
│ └── Features/ # Feature-based organization
147+
│ ├── Accounts/ # User authentication & authorization
148+
│ ├── Bookings/ # Booking system features
149+
│ ├── Gatherings/ # Event management features
150+
│ ├── Files/ # Blob Storage features
151+
│ └── ...
152+
├── tests/ # Test projects
153+
│ └── Evently.Server.Test/ # Backend unit tests
154+
├── deploy/ # Infrastructure and deployment
155+
│ └── Terraform/ # Terraform infrastructure code
156+
├── .github/ # GitHub Actions workflows
157+
│ └── workflows/
158+
│ ├── build.yml # CI pipeline
159+
│ └── deploy.yml # Deployment pipeline
160+
├── docker-compose.yml # Docker services configuration
161+
└── Makefile # Build automation
162+
```

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
Logging__LogLevel__Microsoft.AspNetCore: "Warning"
5252
StorageAccount__AccountName: "evently-dev-images"
5353
StorageAccount__AzureStorageConnectionString: "DefaultEndpointsProtocol=http;AccountName=account1;AccountKey=key1;BlobEndpoint=http://account1.blob.localhost:10000;QueueEndpoint=http://account1.queue.localhost:10001;TableEndpoint=http://account1.table.localhost:10002;"
54-
Authentication__Google__ClientId: "533425050385-fecekp0gl7cc5nt76o0ohgaik7c9l9l1.apps.googleusercontent.com"
55-
Authentication__Google__ClientSecret: "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"
56-
EmailSettings__ActualFrom: "hippotechcode@gmail.com"
57-
EmailSettings__SmtpPassword: "snln ewqe nfyw oyfu"
54+
Authentication__Google__ClientId: "<your-google-client-id>"
55+
Authentication__Google__ClientSecret: "<your-google-client-secret>"
56+
EmailSettings__ActualFrom: "<your-email@example.com>"
57+
EmailSettings__SmtpPassword: "<your-app-password>"
5858
AllowedHosts: "*"
5959

6060
volumes:

src/Evently.Server/appsettings.Development.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
},
1616
"Authentication": {
1717
"Google": {
18-
"ClientId": "<Client ID from https://console.cloud.google.com/apis>",
19-
"ClientSecret": "<Client Secret from https://console.cloud.google.com/apis>"
18+
"ClientId": "<your-google-client-id>",
19+
"ClientSecret": "<your-google-client-secret>"
2020
}
2121
},
2222
"EmailSettings": {
23-
"ActualFrom": "<Email Addr>",
24-
"SmtpPassword": "<Email Password>"
23+
"ActualFrom": "<[email protected]>",
24+
"SmtpPassword": "<your-app-password>"
2525
}
2626
}

src/evently.client/src/lib/services/auth-service.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { redirect } from "@tanstack/react-router";
2-
import axios from "axios";
2+
import axios, { type AxiosResponse } from "axios";
33
import { Account } from "~/lib/domains/entities";
4+
import { sleep } from "~/lib/services/util-service";
45

56
export async function login(redirectUrl: string) {
67
// must redirect instead of making a REST request (https://stackoverflow.com/a/48925986/6514532)
@@ -16,8 +17,14 @@ export async function logout(redirectUrl: string): Promise<void> {
1617

1718
export async function getAccount(): Promise<Account | null> {
1819
try {
19-
const response = await axios.get<Account>("/api/v1/Auth/external/account");
20-
return response.data;
20+
const result: void | AxiosResponse<Account> = await Promise.race([
21+
axios.get<Account>("/api/v1/Auth/external/account"),
22+
sleep(1500)
23+
]);
24+
if (result == null) {
25+
throw new Error("timeout fetching account - might be due to cold start.");
26+
}
27+
return result.data;
2128
} catch (e) {
2229
const error = e as Error;
2330
console.warn(error.message);

0 commit comments

Comments
 (0)