Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 32 additions & 40 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Before creating bug reports, please check the existing issues to avoid duplicate
- **Provide specific examples**
- **Describe the behavior you observed and what you expected**
- **Include screenshots if relevant**
- **Include your environment details** (OS, Python version, etc.)
- **Include your environment details** (OS, Node.js version, etc.)

### Suggesting Enhancements 💡

Expand Down Expand Up @@ -79,62 +79,51 @@ Unsure where to begin? Look for issues labeled:

### Prerequisites

- Python 3.8 or higher
- pip (Python package manager)
- Node.js 20 or higher
- npm (Node package manager)
- Git

### Installation

1. **Create a virtual environment**:
1. **Install dependencies**:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
npm install
```

2. **Install dependencies**:
2. **Generate Prisma client**:
```bash
pip install -r requirements.txt
pip install -r requirements-dev.txt # Development dependencies
npx prisma generate
```

3. **Install pre-commit hooks**:
3. **Run in development mode**:
```bash
pre-commit install
npm run electron:dev
```

### Running Tests

```bash
# Run all tests
pytest
# Run tests (when implemented)
npm test

# Run with coverage
pytest --cov=src --cov-report=html
# Run linting
npm run lint

# Run specific test file
pytest tests/test_crypto.py

# Run tests in watch mode
pytest-watch
# Build the application
npm run build
```

### Code Quality Checks

```bash
# Run linter
flake8 src/ tests/

# Run type checker
mypy src/

# Format code
black src/ tests/
# Run ESLint
npm run lint

# Sort imports
isort src/ tests/
# Build the application
npm run build

# Run all checks (recommended before committing)
pre-commit run --all-files
npm run lint && npm run build
```

## 🔄 Pull Request Process
Expand Down Expand Up @@ -165,8 +154,9 @@ pre-commit run --all-files
Before submitting your PR, ensure:

- [ ] Code follows the project's style guidelines
- [ ] All tests pass (`pytest`)
- [ ] New tests added for new features
- [ ] Linting passes (`npm run lint`)
- [ ] Build succeeds (`npm run build`)
- [ ] New tests added for new features (if applicable)
- [ ] Documentation updated (if applicable)
- [ ] Commit messages follow guidelines
- [ ] No merge conflicts with main branch
Expand All @@ -175,23 +165,24 @@ Before submitting your PR, ensure:

## 🎨 Style Guidelines

### Python Style Guide
### JavaScript/React Style Guide

We follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) with some modifications:
We follow modern JavaScript and React best practices:

- **Line length**: Maximum 100 characters
- **Indentation**: 4 spaces (no tabs)
- **Indentation**: 2 spaces (no tabs)
- **Quotes**: Use double quotes for strings
- **Imports**: Group and sort imports (use `isort`)
- **Type hints**: Use type hints for function signatures
- **Docstrings**: Use Google-style docstrings

### Example Code Style

```python
from typing import Dict, List, Optional
```javascript
// Use modern ES6+ syntax
import { encrypt } from './crypto';

def encrypt_secret(secret: str, key: bytes) -> bytes:
const encryptSecret = async (secret, key) => {
"""Encrypts a secret using the provided key.

Args:
Expand Down Expand Up @@ -329,7 +320,8 @@ All contributors will be:

- [GitHub Flow Guide](https://guides.github.com/introduction/flow/)
- [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)
- [Python Best Practices](https://docs.python-guide.org/)
- [JavaScript Best Practices](https://github.com/ryanmcdermott/clean-code-javascript)
- [React Best Practices](https://react.dev/learn)
- [Hacktoberfest Official Site](https://hacktoberfest.com/)

---
Expand Down
149 changes: 51 additions & 98 deletions SETUP_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ All necessary files have been created! Here's what we have:
```
hacktoberfest
hacktoberfest2025
python
nodejs
electron
react
environment-variables
secrets-management
encryption
cli
desktop-app
developer-tools
open-source
good-first-issue
prisma
sqlite
```

#### Enable Security Features
Expand Down Expand Up @@ -107,117 +111,66 @@ gh auth login

Create some beginner-friendly issues to get started:

- [ ] **Issue 1**: Set up project structure
- Create `src/`, `tests/`, `docs/` directories
- Label: `good first issue`, `hacktoberfest`
- [ ] **Issue 1**: Add search/filter functionality
- Filter environment variables by key/value
- Label: `good first issue`, `hacktoberfest`, `enhancement`

- [ ] **Issue 2**: Create requirements.txt
- Add necessary dependencies
- Label: `good first issue`, `hacktoberfest`
- [ ] **Issue 2**: Add dark/light theme toggle
- Implement theme switcher
- Label: `good first issue`, `hacktoberfest`, `ui`

- [ ] **Issue 3**: Implement basic CLI structure
- Use Click framework
- Label: `enhancement`, `cli`
- [ ] **Issue 3**: Add password strength indicator
- Visual feedback for password creation
- Label: `enhancement`, `security`

- [ ] **Issue 4**: Add encryption module
- Implement AES-256 encryption
- Label: `enhancement`, `crypto`
- [ ] **Issue 4**: Add export templates
- Support for different .env formats
- Label: `enhancement`, `feature`

- [ ] **Issue 5**: Write documentation
- Installation guide
- User guide
- User guide improvements
- API documentation
- Label: `documentation`, `good first issue`

### 4. Project Structure Setup

Create the basic project structure:
The project structure is already set up:

```bash
# Create directories
mkdir -p src/{core,cli,gui,crypto,utils}
mkdir -p tests/{unit,integration}
mkdir -p docs
mkdir -p examples

# Create __init__.py files
touch src/__init__.py
touch src/core/__init__.py
touch src/cli/__init__.py
touch src/gui/__init__.py
touch src/crypto/__init__.py
touch src/utils/__init__.py
touch tests/__init__.py

# Create main entry point
touch src/main.py
touch setup.py
```
ENV_Storage/
├── electron/ # Electron main process
├── src/ # React frontend
│ ├── components/ # React components
│ ├── lib/ # Utility functions
│ └── assets/ # Static assets
├── prisma/ # Database schema
├── public/ # Public assets
└── docs/ # Documentation
```

### 5. Create Essential Files
### 5. Essential Files Already Created

#### requirements.txt
```python
cryptography>=41.0.0
click>=8.1.0
sqlalchemy>=2.0.0
python-dotenv>=1.0.0
rich>=13.0.0
```
All essential files are already in place:

#### requirements-dev.txt
```python
pytest>=7.4.0
pytest-cov>=4.1.0
pytest-xdist>=3.3.0
black>=23.7.0
flake8>=6.1.0
isort>=5.12.0
mypy>=1.5.0
pylint>=2.17.0
bandit>=1.7.0
safety>=2.3.0
pre-commit>=3.3.0
```
#### package.json
- Contains all Node.js dependencies
- Defines npm scripts for development and building
- Configured for Electron desktop app

#### setup.py
```python
from setuptools import setup, find_packages

setup(
name="env-storage",
version="0.1.0",
packages=find_packages(),
install_requires=[
"cryptography>=41.0.0",
"click>=8.1.0",
"sqlalchemy>=2.0.0",
"python-dotenv>=1.0.0",
"rich>=13.0.0",
],
entry_points={
"console_scripts": [
"env-storage=src.main:cli",
],
},
author="Nitya Jain",
description="Secure environment variable storage manager",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/curiouscoder-cmd/ENV_Storage",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.8",
)
```
#### prisma/schema.prisma
- Database schema for SQLite
- Models for Config, Project, EnvVar, and AuditLog

#### electron/
- `main.js` - Electron main process
- `preload.js` - IPC bridge
- `ipc-handlers.js` - Backend handlers
- `crypto.js` - Encryption utilities
- `database.js` - Prisma client

#### src/
- React components and application logic
- Modern UI with Ant Design and Tailwind CSS

### 6. Git Configuration

Expand Down
Loading
Loading