Skip to content

Commit 28e61f3

Browse files
authored
Merge pull request #666 from mikhael28/ai/mock-cleanup
Ai/mock cleanup
2 parents 1710124 + f223642 commit 28e61f3

20 files changed

+18676
-11332
lines changed

MOCK_DATA_README.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# ParetOS Mock Data Setup
2+
3+
## Overview
4+
This application has been modified to run without external authentication and API dependencies. All data is now served from comprehensive mock data sources, allowing the UI to function fully offline.
5+
6+
## Changes Made
7+
8+
### 1. Authentication Bypass
9+
- AWS Amplify authentication has been disabled
10+
- The app now automatically treats users as authenticated
11+
- No login is required to access any features
12+
- `AuthenticatedRoute` component always allows access
13+
14+
### 2. Mock Data Service (`src/services/mockDataService.ts`)
15+
Created a comprehensive mock data service that provides:
16+
17+
#### Mock User Data
18+
- Default demo user with full profile information
19+
- User ID: `bc382b6b-b3fc-4f9c-8f41-88280779ced0`
20+
- Includes XP, achievements, and learning progress
21+
22+
#### Mock Experiences
23+
- **Training/Apprenticeship**: Development environment setup tutorials
24+
- **Product**: Portfolio product building experience
25+
- **Interviewing**: Technical interview preparation materials
26+
27+
#### Mock Sprints
28+
- Pre-configured sprint data with missions and daily tasks
29+
- Includes planning and review sections
30+
- Team collaboration features
31+
32+
#### Mock Mentorship Data
33+
- Sample coaches/mentors with profiles
34+
- Sample athletes/mentees
35+
- Relationship management data
36+
37+
#### Mock Sanity CMS Data
38+
- **Technical Schemas**: React, Node.js, Database courses
39+
- **Economic Schemas**: Freelancing and startup economics
40+
- **Hub Schemas**: Community hubs for developers
41+
42+
### 3. API Call Replacements
43+
All API calls have been replaced with mock service calls:
44+
- `fetchUser()``mockService.api.getUser()`
45+
- `fetchSprints()``mockService.api.getSprints()`
46+
- `fetchCoaches()``mockService.api.getCoaches()`
47+
- `fetchExperiences()``mockService.api.getExperiences()`
48+
- WebSocket connections removed (sprints use static data)
49+
50+
### 4. Files Modified
51+
- `src/App.tsx` - Replaced Auth and API calls with mock service
52+
- `src/components/AuthenticatedRoute.tsx` - Bypassed authentication checks
53+
- `src/utils/queries/initialFetchQueries.ts` - Uses mock data providers
54+
- `src/offline-data/*.js` - Fixed exports for mock data files
55+
56+
### 5. Mock Authentication Flow
57+
The mock auth service provides:
58+
- `signIn()` - Always returns success with demo user
59+
- `signOut()` - Clears local storage
60+
- `currentSession()` - Returns mock session
61+
- `signUp()` - Creates new mock user
62+
- `resetPassword()` - Returns success message
63+
64+
## Running the Application
65+
66+
```bash
67+
# Install dependencies
68+
npm install
69+
70+
# Start development server
71+
npm start
72+
```
73+
74+
The application will run on `http://localhost:5173/`
75+
76+
## Available Features with Mock Data
77+
78+
1. **User Profile** - View and edit demo user profile
79+
2. **Learning Experiences** - Browse training, product, and interview prep modules
80+
3. **Sprint Management** - View and interact with sprint planning tools
81+
4. **Mentorship** - See coach/athlete relationships
82+
5. **Context Builder** - Browse technical and economic learning resources
83+
6. **Community Hubs** - Access developer community features
84+
85+
## Data Persistence
86+
- Mock data is loaded fresh on each page reload
87+
- User modifications are stored in browser localStorage
88+
- No backend persistence (all changes are local)
89+
90+
## Demo Credentials
91+
No login required! The app automatically uses a demo user account.
92+
93+
## Extending Mock Data
94+
To add more mock data:
95+
1. Edit `src/services/mockDataService.ts`
96+
2. Add new data to the appropriate section
97+
3. Update the mock API methods if needed
98+
99+
## Original Data Sources (Now Mocked)
100+
- AWS Cognito (Authentication)
101+
- AWS API Gateway + Lambda (REST APIs)
102+
- WebSocket connections (Real-time sprint updates)
103+
- Sanity CMS (Content management)
104+
- AWS S3 (File storage)
105+
106+
All these services are now simulated locally with comprehensive mock data.

README.MD

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
# Pareto Operating System (ParetOS)
22

3+
Archive Note: In the days before ChatGPT, the ParetOS was an open-source project from 2019-2021 that worked to create a digital mentorship system for aspiring developers, as they worked through a series of practical, experience-based learning modules part of a curriculum sometimes called the Full-Stack Apprenticeship. Before I continue, I wanted to give a shoutout to the 32 developers who contributed their time and code to the project, especially [Jaye Clark](https://github.com/jayeclark) who spearheaded a large scale redesign of the UI in 2020 & was the finest open-source developer I've had the pleasure of working with.
4+
5+
To run an offline-only, static-data-only 'archive' of the ParetOS, simply clone the repository and run `pnpm install && pnpm start` - thanks to the magic of locked dependencies (no carets in your package.json), as of October 30th 2025, the dependencies still install just like they did 2+ years ago.
6+
7+
The modules of the 'Experience' section were designed to work alongside a set of offline paper products and a workbook I designed for aspiring software developers, as the prototype of an educational business. In addition, we had an online, multi-player habit tracker meant to incentivize aspiring developers to improve their study and life habits to help them increase their chance of breaking into the industry. We also had a 'Library of Context', a collection of links and resources curated to guide developers to the right places, but whose data model was designed by me in 2018 in a terrible, inneficient way abstracting types and ids to a headless CMS, resulting in a lack of filterable search for the filters today without that secondary data schema available to us. A simple search of all 600+ resources is available in the Context page.
8+
9+
Perhaps I will write a blog post about this sometime, but it certainly feels odd looking at this in the age of AI development. With the benefit of hindsight and experience, what took 32 people, could probably be done by one person in less time, with access to the latest in AI tooling. It makes me wonder what the future of software development would be; 'back in the day' you actually had to write the code and develop muscle memory & debugging skills. Now, you just lean back in your chair and guide it to the point you want. What a time to be alive.
10+
11+
## Original README below
12+
313
The ParetOS is a browser-based, high-level operating system designed to maximize human potential. It is designed to give you the 20% of software you need on a day-to-day basis that gives you 80% of the benefits modern tech has to offer.
414

5-
Live at [https://paret0.com](https://paret0.com)
15+
Live at [https://paret0.com](https://paret0.com) **note** as of October 2025 the landing page here works, but the sign-in likely doesn't.
616

717
## The Arena
818

dev-dist/sw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (!self.define) {
6767
});
6868
};
6969
}
70-
define(['./workbox-ab7aa862'], (function (workbox) { 'use strict';
70+
define(['./workbox-c676b6d3'], (function (workbox) { 'use strict';
7171

7272
self.skipWaiting();
7373
workbox.clientsClaim();
@@ -82,7 +82,7 @@ define(['./workbox-ab7aa862'], (function (workbox) { 'use strict';
8282
"revision": "3ca0b8505b4bec776b69afdba2768812"
8383
}, {
8484
"url": "index.html",
85-
"revision": "0.mfg2k7gc1p8"
85+
"revision": "0.81q8d0qtgo"
8686
}], {});
8787
workbox.cleanupOutdatedCaches();
8888
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

0 commit comments

Comments
 (0)