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.- Individual application components (e.g.,
WallpaperSetter.js
,Notepad.js
,Calendar.js
).
To add a new application to the desktop environment, follow these steps:
- Create a new React component for your application in a separate file (e.g.,
MyNewApp.js
). - Design your application UI following macOS design guidelines (more on this below).
- Add your application to the
appConfig.js
file.
When creating your application component, keep these points in mind:
- The component should accept at least one prop:
onClose
, which is a function to close the window. - If your application needs to interact with the desktop environment (e.g., changing the wallpaper), additional props may be passed as needed.
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:
- Rounded rectangle buttons with subtle shadows
- Segmented controls for related options
- Sheet-style dialogs for important actions
- Sidebar navigation with a light background
-
Animations: Incorporate smooth, subtle animations for transitions and user interactions.
-
Window Design:
- Use a light title bar with close, minimize, and maximize buttons on the left
- Implement proper window behaviors (resize, drag, focus)
-
Contextual Menus: Provide right-click context menus where appropriate.
-
Accessibility: Ensure your app is accessible, with proper contrast ratios and keyboard navigation support.
- Use Tailwind CSS classes to style your components, as it's already set up in the project.
- Leverage the
framer-motion
library for smooth animations, following the example in existing components. - Ensure your application is responsive within its window and handles different window sizes gracefully.
- Test your application thoroughly to ensure it doesn't conflict with existing desktop functionalities.
- Ensure your code is well-commented and follows the existing code style.
- Test your application thoroughly before submitting.
- Update this README if you add any new dependencies or require any additional setup steps.
- Have fun and be creative, but always prioritize user experience and consistency with the macOS aesthetic!
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!