|
8 | 8 | [](https://www.mongodb.com/) |
9 | 9 | [](https://redis.io/) |
10 | 10 |
|
11 | | -> **SafeExec** is an open-source Remote Code Execution (RCE) platform for secure, isolated code execution in multiple programming languages. Built with a security-first architecture, it provides Docker-containerized execution environments, JWT authentication, rate limiting, and real-time monitoring. |
| 11 | +> **SafeExec** is an enterprise-grade, open-source Remote Code Execution (RCE) platform that enables secure, isolated execution of code in multiple programming languages. Built with security-first architecture, it provides Docker-containerized execution environments, JWT authentication, comprehensive rate limiting, and real-time monitoring. |
12 | 12 |
|
13 | | -## 🌍 Open Source & Community Driven |
| 13 | +## 🌟 Why SafeExec? |
14 | 14 |
|
15 | | -- **🌟 Open Source**: Community-driven development. Contributions are welcome! |
16 | | -- **🔧 Easy Setup**: One-command Docker deployment for local development. |
17 | | -- **📚 Well Documented**: Comprehensive API docs and contributor guides. |
18 | | -- **🤝 Friendly for Contributors**: Clear guidelines, good-first-issues, and a welcoming community. |
19 | | - |
20 | | -## 🏗️ System Architecture |
21 | | - |
22 | | -SafeExec uses a microservices architecture with layered security and isolated execution environments. See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for more details. |
| 15 | +- **🔒 Security First**: Every code execution runs in isolated Docker containers |
| 16 | +- **🌍 Open Source**: Community-driven development and contributions welcome |
| 17 | +- **🔧 Easy Setup**: One-command Docker deployment for all environments |
| 18 | +- **📚 Well Documented**: Comprehensive API docs and contributor guides |
23 | 19 |
|
24 | 20 | --- |
25 | 21 |
|
26 | | -## 🚀 Quick Start for Contributors |
| 22 | +## 🧑💻 **Contributor Quick Start** |
27 | 23 |
|
28 | | -### Prerequisites |
29 | | - |
30 | | -- **Node.js 18+** and **Yarn** |
31 | | -- **Docker & Docker Compose** (latest) |
32 | | -- **Git** |
| 24 | +> **We love contributors!** Follow these steps to get started quickly: |
33 | 25 |
|
34 | 26 | ### 1. Fork & Clone the Repository |
35 | 27 |
|
36 | 28 | ```bash |
37 | | -# Fork on GitHub, then: |
| 29 | +# Fork the repository on GitHub first, then: |
38 | 30 | git clone https://github.com/YOUR_USERNAME/SafeExec.git |
39 | 31 | cd SafeExec |
| 32 | + |
40 | 33 | git remote add upstream https://github.com/vikashkrdeveloper/SafeExec.git |
41 | 34 | ``` |
42 | 35 |
|
43 | | -### 2. Local Development Setup (Recommended) |
| 36 | +### 2. Quick Local Setup (Recommended) |
44 | 37 |
|
45 | 38 | ```bash |
46 | 39 | yarn setup:dev |
47 | | -# Installs dependencies, builds Docker executors, starts all services, seeds DB |
| 40 | +# Installs dependencies, builds Docker executors, starts dev environment, seeds DB |
48 | 41 | ``` |
49 | 42 |
|
50 | 43 | ### 3. Manual Setup (Step by Step) |
51 | 44 |
|
52 | 45 | ```bash |
53 | | -yarn setup # Install dependencies & build executors |
54 | | -cp .env.example .env # Copy env template and edit for local config |
55 | | -yarn docker:setup:dev # Start all services (API, MongoDB, Redis, Nginx) |
56 | | -yarn docker:seed:dev # Seed database with sample data |
57 | | -yarn dev # (API only, needs local MongoDB/Redis) |
| 46 | +yarn setup |
| 47 | +cp .env.example .env |
| 48 | +# Edit .env as needed |
| 49 | + |
| 50 | +yarn docker:setup:dev |
| 51 | +# Or: yarn dev (if running MongoDB/Redis locally) |
58 | 52 | ``` |
59 | 53 |
|
60 | 54 | ### 4. Verify Setup |
61 | 55 |
|
62 | 56 | ```bash |
63 | | -yarn docker:status # Check all services |
64 | | -yarn health # Check API health |
65 | | -yarn logs # View logs |
66 | | -yarn shell # Access container shell |
| 57 | +yarn docker:status |
| 58 | +yarn health |
67 | 59 | ``` |
68 | 60 |
|
| 61 | +### 5. Start Contributing! |
| 62 | + |
| 63 | +- Create a feature branch: `git checkout -b feature/your-feature` |
| 64 | +- Make your changes and add tests |
| 65 | +- Run checks: `yarn test && yarn lint && yarn typecheck` |
| 66 | +- Commit and push: `git commit -m "feat: your change" && git push` |
| 67 | +- Open a Pull Request on GitHub |
| 68 | + |
69 | 69 | --- |
70 | 70 |
|
71 | | -## 🤝 Contributing |
| 71 | +## 🤝 How to Contribute |
72 | 72 |
|
73 | | -We welcome contributions from everyone! Whether you're fixing bugs, adding features, improving docs, or enhancing security, your help makes SafeExec better. |
| 73 | +- **Find an issue**: Look for [good first issue](https://github.com/vikashkrdeveloper/SafeExec/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) or [help wanted](https://github.com/vikashkrdeveloper/SafeExec/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted) |
| 74 | +- **Discuss**: Comment on issues or open a new one for ideas |
| 75 | +- **Follow code style**: Use ESLint, Prettier, and TypeScript |
| 76 | +- **Write tests**: Keep coverage high |
| 77 | +- **Update docs**: If you change or add features |
74 | 78 |
|
75 | | -### Ways to Contribute |
| 79 | +See the [Contributing Guide](CONTRIBUTING) for more details. |
76 | 80 |
|
77 | | -- **🐛 Bug Reports**: Create issues with clear steps |
78 | | -- **✨ Feature Requests**: Suggest new features |
79 | | -- **📝 Documentation**: Improve docs or code comments |
80 | | -- **🔧 Code**: Fix bugs, add features, optimize performance |
81 | | -- **🛡️ Security**: Help identify and fix vulnerabilities |
82 | | -- **🧪 Testing**: Add or improve tests |
| 81 | +--- |
83 | 82 |
|
84 | | -### Getting Started |
| 83 | +## 🚀 Quick Start (for all users) |
85 | 84 |
|
86 | | -1. Find or create an issue ([good-first-issue](https://github.com/vikashkrdeveloper/SafeExec/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) is great for beginners) |
87 | | -2. Set up your environment (see above) |
88 | | -3. Follow code style: `yarn lint`, `yarn format`, `yarn typecheck` |
89 | | -4. Run tests: `yarn test`, `yarn test:coverage`, `yarn test:integration` |
90 | | -5. Make a branch, commit, push, and open a Pull Request |
| 85 | +### Prerequisites |
91 | 86 |
|
92 | | -### Code Guidelines |
| 87 | +- **Node.js 18+** and **Yarn** |
| 88 | +- **Docker & Docker Compose** |
| 89 | +- **Git** |
| 90 | +- **MongoDB** and **Redis** (via Docker Compose) |
93 | 91 |
|
94 | | -- Use TypeScript for all new code |
95 | | -- Add JSDoc for public functions |
96 | | -- Write tests for new features |
97 | | -- Keep functions small and focused |
98 | | -- Use meaningful variable names |
| 92 | +### Local Development Setup |
| 93 | + |
| 94 | +```bash |
| 95 | +yarn setup:dev |
| 96 | +# or step by step: |
| 97 | +yarn setup |
| 98 | +cp .env.example .env |
| 99 | +# Edit .env |
| 100 | + |
| 101 | +yarn docker:setup:dev |
| 102 | +# or: yarn dev |
| 103 | +``` |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## 📚 Documentation |
| 108 | + |
| 109 | +- [API Documentation](docs/API.md) |
| 110 | +- [Development Guide](docs/DEVELOPMENT.md) |
| 111 | +- [Docker Guide](docs/DOCKER.md) |
99 | 112 |
|
100 | 113 | --- |
101 | 114 |
|
102 | | -## 📁 Project Structure |
| 115 | +## 📝 API Endpoints (Sample) |
| 116 | + |
| 117 | +- `POST /api/auth/register` — Register user |
| 118 | +- `POST /api/auth/login` — Login |
| 119 | +- `GET /api/auth/profile` — Get profile |
| 120 | +- `POST /api/submit` — Submit code |
| 121 | +- `GET /api/problems` — List problems |
| 122 | + |
| 123 | +See [API.md](docs/API.md) for full details. |
| 124 | + |
| 125 | +--- |
103 | 126 |
|
104 | | -See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for a full breakdown. |
| 127 | +## 🛡️ Security & Architecture |
| 128 | + |
| 129 | +- Isolated Docker containers for each code run |
| 130 | +- JWT authentication & rate limiting |
| 131 | +- Input validation & sanitization |
| 132 | +- Resource limits (CPU, memory, time) |
| 133 | +- Audit logs & monitoring |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## 📦 Project Structure |
105 | 138 |
|
106 | 139 | ``` |
107 | 140 | SafeExec/ |
108 | 141 | ├── src/ # Source code |
109 | 142 | ├── docker/ # Docker configs |
110 | | -├── tests/ # Test files |
| 143 | +├── tests/ # Tests |
111 | 144 | ├── docs/ # Documentation |
112 | 145 | ├── scripts/ # Utility scripts |
113 | | -├── ... |
| 146 | +├── ... # More files |
114 | 147 | ``` |
115 | 148 |
|
116 | 149 | --- |
117 | 150 |
|
118 | | -## 📝 API Documentation |
119 | | - |
120 | | -See [docs/API.md](docs/API.md) for full API reference. |
121 | | - |
122 | | ---- |
123 | | - |
124 | 151 | ## 🆘 Getting Help |
125 | 152 |
|
126 | | -- Check documentation and issues |
127 | | -- Ask questions via GitHub Issues or Discussions |
128 | | -- When asking for help, include OS, Node.js, Docker versions, error logs, and steps to reproduce |
| 153 | +- Check [issues](https://github.com/vikashkrdeveloper/SafeExec/issues) |
| 154 | +- Read the docs |
| 155 | +- Open a discussion or ask a question |
129 | 156 |
|
130 | 157 | --- |
131 | 158 |
|
|
0 commit comments