Event Base is Trainspot's comprehensive event management platform that serves as the foundation for all Event Stacks applications. It provides a centralized system for managing events, participants, staff, and operations.
Event Base is the central hub that powers:
┌─────────────────────────────────────────────────────┐
│ Event Base Platform │
│ ┌─────────────────────────────────────────────┐ │
│ │ GraphQL API Layer │ │
│ └─────────────────────────────────────────────┘ │
│ │ │
│ ┌────────────────────┴─────────────────────────┐ │
│ │ │ │
│ │ PostgreSQL Firebase Realtime DB │ │
│ │ (Primary Data) (Sync & Offline) │ │
│ └────────────────────┬─────────────────────────┘ │
└────────────────────────┼─────────────────────────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ Access │ │ POS │ │ Time │
│ Stack │ │ Stack │ │ Stack │
└─────────┘ └─────────┘ └─────────┘
│ │ │
┌────▼────┐ ┌────▼────┐
│ Sales │ │ Task │
│ Stack │ │ Stack │
└─────────┘ └─────────┘
The Event Base platform exposes a comprehensive GraphQL API for all operations.
Base URL: https://api.eventstacks.io/graphql
type Event {
id: ID!
name: String!
description: String
location: String
startDate: DateTime!
endDate: DateTime!
status: EventStatus!
participants: [Participant!]!
staff: [Staff!]!
pos: [PointOfSale!]!
}
type Participant {
id: ID!
name: String!
email: String
qrCode: String!
category: ParticipantCategory!
event: Event!
transactions: [Transaction!]!
}
type Staff {
id: ID!
name: String!
email: String!
role: StaffRole!
events: [Event!]!
timecards: [Timecard!]!
}
query GetEvent($eventId: ID!) {
event(id: $eventId) {
id
name
startDate
endDate
participants {
id
name
qrCode
}
staff {
id
name
role
}
}
}
query GetParticipantByQR($qrCode: String!) {
participantByQR(qrCode: $qrCode) {
id
name
category {
name
}
event {
id
name
}
}
}
mutation CreateTransaction($input: TransactionInput!) {
createTransaction(input: $input) {
id
total
status
items {
product {
name
}
quantity
price
}
}
}
mutation RecordTimecard($input: TimecardInput!) {
recordTimecard(input: $input) {
id
staff {
name
}
checkIn
checkOut
}
}
Events
id (UUID, PK)name (VARCHAR)description (TEXT)start_date (TIMESTAMP)end_date (TIMESTAMP)status (ENUM)created_at (TIMESTAMP)updated_at (TIMESTAMP)Participants
id (UUID, PK)event_id (UUID, FK)name (VARCHAR)email (VARCHAR)qr_code (VARCHAR, UNIQUE)category_id (UUID, FK)created_at (TIMESTAMP)Staff
id (UUID, PK)name (VARCHAR)email (VARCHAR, UNIQUE)role (ENUM)created_at (TIMESTAMP)Transactions
id (UUID, PK)event_id (UUID, FK)participant_id (UUID, FK)staff_id (UUID, FK)total (DECIMAL)status (ENUM)created_at (TIMESTAMP)interface Permissions {
canManageEvents: boolean;
canManageParticipants: boolean;
canManageStaff: boolean;
canProcessTransactions: boolean;
canViewReports: boolean;
canAccessSettings: boolean;
}
All API requests require authentication via Firebase ID tokens:
Authorization: Bearer <firebase-id-token>
All Event Stacks applications connect to Event Base through:
// Initialize Firebase
await Firebase.initializeApp();
// Authenticate user
final userCredential = await FirebaseAuth.instance
.signInWithEmailAndPassword(
email: email,
password: password,
);
// Get ID token for API
final idToken = await userCredential.user?.getIdToken();
// Configure GraphQL client
final httpLink = HttpLink(
'https://api.eventstacks.io/graphql',
defaultHeaders: {
'Authorization': 'Bearer $idToken',
},
);
final client = GraphQLClient(
cache: GraphQLCache(),
link: httpLink,
);
// Query events
final result = await client.query(
QueryOptions(
document: gql('''
query GetEvents {
events {
id
name
startDate
}
}
'''),
),
);
Clone Repository:
git clone git@git.trainspot.jp:trainspot/event-base-platform.git
cd event-base-platform
Install Dependencies:
npm install
# or
yarn install
Configure Environment:
cp .env.example .env
# Edit .env with your credentials
Run Database Migrations:
npm run migrate
Start Development Server:
npm run dev
# Run unit tests
npm run test
# Run integration tests
npm run test:integration
# Run E2E tests
npm run test:e2e
For Event Base platform issues:
Last Updated: October 2025
Platform Version: 2.0
Maintained By: Platform Team