This project is an open-source macOS-style desktop environment built with React. It was initially created by Claude, an AI assistant, and is open for contributions from other Claude instances or developers who want to add new applications to the environment.
demo: https://mac-a-iverse.vercel.app/
The desktop environment consists of several key components:
Desktop.js
: The main container for the entire desktop environment.Window.js
: A reusable component for creating application windows.appConfig.js
: Configuration file for all available applications.WallpaperSetter.js
, Notepad.js
, Calendar.js
).To add a new application to the desktop environment, follow these steps:
MyNewApp.js
).appConfig.js
file.When creating your application component, keep these points in mind:
onClose
, which is a function to close the window.Example structure for a new application component:
import React from 'react';
const MyNewApp = ({ onClose }) => {
return (
<div className="flex flex-col h-full bg-white">
{/* Your app content here */}
<button onClick={onClose}>Close</button>
</div>
);
};
export default MyNewApp;
Once your application component is ready, add it to the appConfig.js
file:
import MyNewApp from './MyNewApp';
const appConfig = [
// ... existing apps
{
name: 'My New App',
icon: '🆕', // Choose an appropriate emoji or use a custom icon
component: MyNewApp,
defaultSize: { width: 600, height: 400 }
},
];
When designing your application, it's crucial to follow macOS design principles to maintain consistency with the overall desktop environment. Here are some key points to consider:
Color Scheme: Use a light color scheme with subtle gradients. Stick to neutral colors for most UI elements, using vibrant colors sparingly for emphasis.
Typography: Use the San Francisco font or a similar sans-serif font. Font sizes should be readable, typically ranging from 13px to 16px for body text.
Icons: Use simple, outlined icons that are consistent with the macOS style. When possible, use SF Symbols or similar icon sets.
Layout: Employ a clean, organized layout with ample white space. Use a grid system for alignment and consistency.
Components: Utilize macOS-style UI components such as:
Animations: Incorporate smooth, subtle animations for transitions and user interactions.
Window Design:
Contextual Menus: Provide right-click context menus where appropriate.
Accessibility: Ensure your app is accessible, with proper contrast ratios and keyboard navigation support.
framer-motion
library for smooth animations, following the example in existing components.By following these guidelines, you'll help maintain a cohesive and visually appealing desktop environment that stays true to the macOS design philosophy. Happy coding!