A support platform for unemployed professionals in Brazil
"Welcome, unemployed! How can we help you today?"
π Live Demo β’ π Report Bug β’ β¨ Request Feature
Note: This project was originally developed in Portuguese for the Brazilian market. The platform interface is in Portuguese (pt-BR).
- About the Project
- Key Features
- Tech Stack
- Getting Started
- Usage
- Project Structure
- API Routes
- Contributing
- License
- Contact
desempregados.com (literally "Unemployed.com" in Portuguese) is a full-stack web platform built with Node.js, Express, and MongoDB for the Brazilian job market.
This platform provides:
- π― Career Guidance - Resources and guides for job placement
- π Career Pages - Dynamic career information and resources
- π€ Community Platform - Connection between candidates and companies
- πΌ Job Listings - Post and browse job opportunities
- π₯ Dual User Roles - Separate interfaces for candidates and companies
Designed specifically for the Brazilian market:
- π§π· Interface entirely in Brazilian Portuguese (pt-BR)
- π Focus on Brazilian labor market regulations
- π° Salary information in Brazilian Real (BRL)
- π Compliance with Brazilian labor laws and LGPD
- π’ Tailored for Brazilian employment culture
- Email-based login with Passport.js
- Dual user roles: Candidates and Companies
- Session management with express-session
- Separate models for Candidates and Companies
- Profile creation and management
- Admin role support
- Create, read, update, and delete job listings
- Company-specific job postings
- Job search and filtering
- Dynamic career resource pages
- Content management system
- Educational materials and guides
- Cloudinary integration for file storage
- Profile pictures and company logos
- Optimized image handling
- Bootstrap 5 framework
- Bootstrap Icons
- Mobile-friendly design
- Custom CSS styling
- Success and error notifications
- User feedback system
- Request logging with UUID
- Error tracking and monitoring
- Template Engine - EJS (Embedded JavaScript)
- Layout Engine - EJS-Mate
- CSS Framework - Bootstrap 5
- Icons - Bootstrap Icons
- Styling - Custom CSS3
- JavaScript - Vanilla JS
- Runtime - Node.js
- Framework - Express.js
- Template Engine - EJS
- Session Store - express-session
- Flash Messages - connect-flash
- HTTP Method Override - method-override
- Database - MongoDB
- ODM - Mongoose
- Schema Models:
- User (with role-based profiles)
- Candidate
- Company
- Job
- Career
- CareerPage
- Strategy - Passport.js
- Plugin - passport-local-mongoose
- Method - Email-based authentication (custom strategy)
- Session Management - express-session with cookies
- Cloud Storage - Cloudinary
- Upload Middleware - Multer
- Storage - multer-storage-cloudinary
- Supported Formats - JPEG, JPG, PNG
- Environment Variables - dotenv
- Date Formatting - date-fns
- Unique IDs - uuid
- Async Handling - express-async-handler
- Hosting - Render.com
- Database Hosting - MongoDB Atlas
- SSL - Automatic HTTPS (Render)
- Process Manager - nodemon (development)
- Version Control - Git / GitHub
- Package Manager - npm
- Development Server - nodemon
Before you begin, ensure you have the following installed:
-
Node.js (v14.x or higher)
node --version
-
npm (comes with Node.js)
npm --version
-
MongoDB (local or Atlas account)
- Local: MongoDB Community Edition
- Cloud: MongoDB Atlas (Free tier available)
-
Cloudinary Account (for image uploads)
- Sign up at Cloudinary for free
-
Clone the repository
git clone https://github.com/adrian1715/desempregados.com.git cd desempregados.com -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the project root:touch .env
Add the following variables (see Environment Variables section for details)
-
Set up MongoDB
Option A: Local MongoDB
# Start MongoDB service mongod # The connection will be: # DB_URL=mongodb://localhost:27017/desempregados
Option B: MongoDB Atlas
- Create a cluster on MongoDB Atlas
- Get your connection string
- Replace
<password>and database name in the connection string
-
Start the development server
npm start
This will start nodemon on port 3000 (or your specified PORT)
-
Open in browser
Navigate to http://localhost:3000
Create a .env file in the project root with the following variables:
# Node Environment
NODE_ENV=development
# Server Configuration
PORT=3000
# MongoDB Database
DB_URL=mongodb://localhost:27017/desempregados
# For MongoDB Atlas, use:
# DB_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/desempregados?retryWrites=true&w=majority
# Session Secret (use a strong random string)
SESSION_SECRET=your_super_secret_session_key_here_change_in_production
# Cloudinary Configuration (for image uploads)
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_KEY=your_cloudinary_api_key
CLOUDINARY_SECRET=your_cloudinary_api_secretMongoDB Atlas:
- Create account at MongoDB Atlas
- Create a cluster (free tier available)
- Click "Connect" β "Connect your application"
- Copy the connection string
- Replace
<password>with your database user password
Cloudinary:
- Sign up at Cloudinary
- Go to Dashboard
- Copy your Cloud Name, API Key, and API Secret
- Paste into
.envfile
Session Secret:
- Generate a strong random string:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
-
Register
- Go to
/cadastro(Registration) - Select "Candidate" role
- Fill in your information
- Create account
- Go to
-
Browse Jobs
- Navigate to
/vagas(Jobs) - Filter by category, location, or company
- View job details
- Navigate to
-
Apply for Jobs
- Click on job listing
- View requirements and description
- Apply directly through the platform
-
Manage Profile
- Update your information
- Upload profile picture
- Track your applications
-
Register
- Go to
/cadastro(Registration) - Select "Company" role
- Fill in company details
- Create account
- Go to
-
Post Jobs
- Navigate to
/vagas/new(New Job) - Fill in job details
- Publish listing
- Navigate to
-
Manage Listings
- View all your job postings
- Edit or delete jobs
- Track applications
-
Company Profile
- Update company information
- Upload company logo
- Manage job listings
- Access admin panel for content management
- Manage career pages and resources
- Monitor platform activity
- Moderate content
desempregados.com/
βββ config/ # Configuration files
β βββ cloudinary.js # Cloudinary setup
β βββ db.js # MongoDB connection
β
βββ middlewares/ # Express middlewares
β βββ auth.js # Authentication middleware
β βββ errorHandler.js # Error handling
β βββ getPages.js # Page fetching middleware
β βββ logEvents.js # Request logging
β
βββ models/ # Mongoose models
β βββ User.js # User model (with roles)
β βββ Candidate.js # Candidate profile
β βββ Company.js # Company profile
β βββ Job.js # Job listings
β βββ Career.js # Career resources
β βββ CareerPage.js # Career pages
β
βββ routes/ # Express routes
β βββ api/ # RESTful API routes
β β βββ index.js # API router
β β βββ users.js # User API
β β βββ careers.js # Career API
β β βββ careerPages.js # Career Pages API
β β βββ jobs.js # Jobs API
β βββ auth.js # Authentication routes
β βββ careers.js # Career page routes
β βββ jobs.js # Job listing routes
β βββ index.js # Main routes
β
βββ views/ # EJS templates
β βββ layouts/ # Layout templates
β β βββ boilerplate.ejs # Main layout
β βββ pages/ # Page templates
β β βββ auth/ # Login/Register pages
β β βββ carreiras/ # Career pages
β β βββ vagas/ # Job pages
β β βββ index.ejs # Homepage
β β βββ candidatos.ejs # Candidates page
β β βββ empresas.ejs # Companies page
β β βββ sobre.ejs # About page
β βββ partials/ # Reusable components
β β βββ auth/ # Auth forms
β β βββ navbar.ejs # Navigation bar
β β βββ footer.ejs # Footer
β β βββ flash.ejs # Flash messages
β βββ error.ejs # Error page
β
βββ public/ # Static files
β βββ css/ # Stylesheets
β β βββ styles.css # Global styles
β β βββ auth.css # Auth page styles
β β βββ index.css # Homepage styles
β β βββ careers/ # Career page styles
β βββ js/ # Client-side JavaScript
β β βββ app.js # Main app JS
β β βββ auth/ # Auth scripts
β β βββ careers/ # Career scripts
β β βββ jobs/ # Job scripts
β βββ img/ # Images
β β βββ home/ # Homepage images
β β βββ footer/ # Footer icons
β βββ bootstrap/ # Bootstrap files
β βββ bootstrap.min.css
β βββ bootstrap.bundle.js
β βββ validateForm.js
β βββ icons/ # Bootstrap Icons
β
βββ utils/ # Utility functions
β βββ CustomError.js # Custom error class
β βββ validation.js # Validation helpers
β βββ string.js # String utilities
β
βββ .env # Environment variables (not in repo)
βββ .gitignore # Git ignore rules
βββ index.js # Application entry point
βββ package.json # Dependencies and scripts
βββ package-lock.json # Dependency lock file
βββ README.md # This file (English)
βββ README-ptbr.md # Portuguese README
POST /cadastro- User registrationPOST /login- User loginGET /logout- User logout
GET /vagas- List all jobsGET /vagas/new- New job form (companies only)POST /vagas- Create new jobGET /vagas/:id- View job detailsGET /vagas/:id/edit- Edit job formPUT /vagas/:id- Update jobDELETE /vagas/:id- Delete job
GET /carreiras- List all careersGET /carreiras/new- New career form (admin only)POST /carreiras- Create new careerGET /carreiras/:id- View career detailsGET /carreiras/:id/edit- Edit career formPUT /carreiras/:id- Update careerDELETE /carreiras/:id- Delete careerGET /carreiras/:id/pages- Career pages
GET /api/users- Get usersGET /api/jobs- Get jobs (JSON)GET /api/careers- Get careers (JSON)GET /api/careerPages- Get career pages (JSON)
GET /- HomepageGET /candidatos- Candidates pageGET /empresas- Companies pageGET /sobre- About page
Contributions make the open-source community an amazing place to learn and create. Any contributions are greatly appreciated!
-
Fork the Project
-
Create your Feature Branch
git checkout -b feature/AmazingFeature
-
Commit your Changes
git commit -m 'feat: Add some AmazingFeature' -
Push to the Branch
git push origin feature/AmazingFeature
-
Open a Pull Request
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code formattingrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
- Code: English comments preferred
- UI/UX: Portuguese (pt-BR) required
- Documentation: Both English and Portuguese
- Commits: English preferred, Portuguese accepted
- Issues/PRs: Either language acceptable
Use GitHub Issues:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (browser, OS)
Distributed under the MIT License. See LICENSE file for more information.
Adrian - @adrian1715
Project Link: https://github.com/adrian1715/desempregados.com
Live Demo: https://desempregados-com.onrender.com/
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB ODM
- Passport.js - Authentication middleware
- EJS - Embedded JavaScript templating
- Bootstrap - CSS framework
- Cloudinary - Image hosting and management
- Render.com - Free and reliable hosting
- The Brazilian tech community for their support
- All contributors who helped build this platform
- β Star this repository
- π Report bugs and suggest improvements
- π» Contribute code
- π’ Share with other professionals
- π¬ Provide feedback
Este README estΓ‘ disponΓvel em portuguΓͺs brasileiro. Clique aqui para ler em portuguΓͺs.
"Unemployed today, employed tomorrow. We believe in you!"
"Desempregado hoje, empregado amanhΓ£. NΓ³s acreditamos em vocΓͺ!"
