Code Tapestry Timeline

Where version history becomes woven art. Hover over threads to reveal the story behind each change.

Added authentication middleware

2 days ago by Alex

+ const authenticate = (req, res, next) => {
+   const token = req.headers.authorization?.split(' ')[1];
+   if (!token) return res.status(401).send('Access denied');
+   try {
+     const verified = jwt.verify(token, process.env.JWT_SECRET);
+     req.user = verified;
+     next();
+   } catch (err) {
+     res.status(400).send('Invalid token');
+   }
+ };
+24 lines

Removed deprecated API endpoints

1 week ago by Sam

- app.get('/api/v1/old-endpoint', (req, res) => {
-   // Deprecated since v2.3
-   res.json({ message: "This endpoint is no longer supported" });
- });
-8 lines

Implemented dark mode toggle

3 weeks ago by Jordan

+ const [darkMode, setDarkMode] = useState(false);
+
+ useEffect(() => {
+   if (darkMode) {
+     document.documentElement.classList.add('dark');
+   } else {
+     document.documentElement.classList.remove('dark');
+   }
+ }, [darkMode]);
+12 lines

Cleaned up unused dependencies

1 month ago by Taylor

- "dependencies": {
-   "lodash": "^4.17.20",
-   "moment": "^2.29.1",
-   "request": "^2.88.2"
- }
-5 lines

Added error boundary component

2 months ago by Casey

+ class ErrorBoundary extends React.Component {
+   state = { hasError: false };
+
+   static getDerivedStateFromError(error) {
+     return { hasError: true };
+   }
+
+   componentDidCatch(error, errorInfo) {
+     logErrorToService(error, errorInfo);
+   }
+
+   render() {
+     if (this.state.hasError) {
+       return ;
+     }
+     return this.props.children;
+   }
+ }
+18 lines

Made with DeepSite LogoDeepSite - 🧬 Remix